3
$\begingroup$

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

$\endgroup$
0

2 Answers 2

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

enter image description here

$\endgroup$
1
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.