TransWikia.com

How do I connect a line to a graph of the graph?

Mathematica Asked by Abdol Ali on May 2, 2021

I want to connect a line of plot to plot which describe about plot’s name, in the following code:

Plot[{Sin[x], Cos[x]}, {x, 0, 2*Pi}]

Any suggestion?

plot

2 Answers

Plot[{Callout[Sin[x], "sin(x)", Above], Callout[Cos[x], "cos(x)", Above]}, {x, 0, 2*Pi}]

enter image description here

Correct answer by user36273 on May 2, 2021

You can also use Callout as the option setting for PlotLabels:

Plot[{Sin[x], Cos[x]}, {x, 0, 2 Pi}, PlotLabels -> Callout["Expressions", Above]]

enter image description here

Answered by kglr on May 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP