3
$\begingroup$

When I do SetOptions[Callout,CalloutStyle->Red] and then do Plot[Callout[x^2],{x,-3,3}], I get plot with a regular gray (not red) callout marker. Can I not set those options globally?

$\endgroup$

2 Answers 2

1
$\begingroup$

Another work-around: Use SetOptions for Plot to set the option value for PlotLabels:

SetOptions[Plot, 
  PlotLabels -> Callout[Automatic, Automatic, CalloutStyle -> Red]];

Plot[x^2, {x, -3, 3}]

enter image description here

Plot[{x^2, 5 + x^2, 10 - 4 x}, {x, -3, 3}]

enter image description here

$\endgroup$
1
  • $\begingroup$ That'll do...thanks very much. $\endgroup$
    – bmclaurin
    Sep 12 at 4:11
2
$\begingroup$

A workaround:

calloutopts = Sequence[CalloutStyle -> Red];

Plot[Callout[x^2, x^2, calloutopts], {x, -3, 3}]

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Weird. I wonder why that works and the naive, direct way does not... that the global option setting does not work. $\endgroup$ Sep 9 at 22:54
  • $\begingroup$ Your answer is essentially what I've been doing. I'll hold out for a bit to see if anyone has a way to make the global setting work before accepting this as answered. Thank you. $\endgroup$
    – bmclaurin
    Sep 10 at 9:27

Your Answer

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

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