Message Boards Message Boards

GROUPS:

Labeling curves inside a plot?

Posted 4 days ago
156 Views
|
1 Reply
|
0 Total Likes
|

I want to lable the curves within graph itself. Here is my code

ClearAll["Global`*"];
\[Epsilon] = {0, 0.3, 0.4, 0.5};
\[Beta] = 45;
\[Lambda] = 1;
Nu[F_] := 829440/(
  103680 - 8640 \[Epsilon]^2 + 3960 \[Epsilon]^4 + 297 \[Epsilon]^6 + 
   40 F^2 \[Epsilon]^6 \[Lambda]^2 + 
   40 F^2 \[Epsilon]^6 \[Lambda]^2 Cos[2 \[Beta]]);
Table[{F, Nu[F]}, {F, -5000, 10000, 1000}] // TableForm;
Plot[{Nu[F]}, {F, -5000, 5000},
 PlotRange -> {{-5000, 5000}, {0, 9}},
 AxesStyle -> {Black, Black},
 AxesLabel -> {HoldForm[F], HoldForm[Nu]},
 LabelStyle -> {FontFamily -> "Times New Roman", 16, Bold}

 ]

As curves are for different epsilon. So i want to lable each curve for epsilon values. Please help

You can use PlotLegends or Callout

ClearAll["Global`*"];
\[Epsilon] = {0, 0.3, 0.4, 0.5};
\[Beta] = 45;
\[Lambda] = 1;
Nu[F_, \[Epsilon]_] := 
  829440/(103680 - 8640 \[Epsilon]^2 + 3960 \[Epsilon]^4 + 
     297 \[Epsilon]^6 + 40 F^2 \[Epsilon]^6 \[Lambda]^2 + 
     40 F^2 \[Epsilon]^6 \[Lambda]^2 Cos[2 \[Beta]]);

Plot[Evaluate[Callout[Nu[F, #], #] & /@ \[Epsilon]],
 {F, -5000, 5000}, PlotRange -> {{-5000, 5000}, {0, 9}}, 
 AxesStyle -> {Black, Black}, AxesLabel -> {"F", "Nu"}, 
 LabelStyle -> {FontFamily -> "Times New Roman", 16, Bold},
 PlotLegends -> \[Epsilon]
 ]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract