9
$\begingroup$

I have tried this plot:

Plot[Evaluate[Callout[(Exp[-γ ρ^2] /. γ -> #), "γ=" <> ToString[#],  
LabelStyle -> {Bold, Italic}] & /@ {0, 0.1, 1, 4, 9}], {ρ, 0, 1}, PlotRange 
-> {-0.05, 1.2}, AspectRatio -> 0.8, Frame -> True, PlotStyle -> {Black, 
{Black, Dashing[{0.02, 0.01}]}, {Black, Dashing[Medium]}, {Black, 
Dashing[Small]}, {Black, Dashing[Tiny]}}, FrameLabel -> {Style["ρ", 18], 
Style["A(ρ)", 22]},GridLines -> Automatic, RotateLabel -> True(*,FrameStyle\
[Rule]Directive[Plain,16,FontFamily\[Rule]"Times\New Roman"]*)]

This is the result:

enter image description here

However, the labels of each curve should be in bold and italic.

I know and have checked that for a single curve it works. Why not for several ones?

Thanks for your time.

$\endgroup$
4
  • 2
    $\begingroup$ In my experience, Callout does seem to have a number of significant bugs. As you observe, styling doesn't seem to work if you want to just accept the default positioning. You'll find that it will work if you position the callout labels manually. Automatic placement of the labels can be strange, too. I think Callout just wasn't quite ready for prime time yet; hopefully it will be fixed in the next maintenance update. $\endgroup$
    – Pirx
    Sep 23, 2016 at 11:44
  • $\begingroup$ Other options such as CalloutStyle or Appearance do not work either. $\endgroup$ Sep 23, 2016 at 18:04
  • 1
    $\begingroup$ Maybe it works now, but I haven't received the update yet. The Quick Revision History says for V11.0.1: "ListPlot labeling and callout functionality now exhibit expected behavior". $\endgroup$
    – Coolwater
    Sep 28, 2016 at 17:25
  • $\begingroup$ I have just updated to 11.0.1. Unfortunately, I still obtain the same plot as above. $\endgroup$ Sep 29, 2016 at 19:47

1 Answer 1

10
$\begingroup$

You can use this modification

Callout[(Exp[-γ ρ^2] /. γ -> #), 
  Style["γ=" <> ToString[#], Bold, Italic]]
$\endgroup$
1
  • $\begingroup$ Excellent suggestion, styling the label straightforwardly seems to be a valid solution... $\endgroup$ Sep 23, 2016 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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