3
$\begingroup$

Possible Duplicate:
Why does ListPlot ignore some global options?

Using this data:

curve = {{0.833, 0.1}, {0.25, 0.08}, {0.5, 0.15}, {1, 0.2}, {2, 
0.3}, {3, 0.45}, {5, 0.75}, {7, 1.25}, {10, 1.85}, {20, 
2.55}, {30, 3}};  

ListPlot with options set inside show plot markers:

Mathematica graphics

But if I put the exact same options in SetOptions, like this:

SetOptions[ListPlot, ImageSize->300, Frame->True, Joined->True, PlotMarkers->Automatic,
AxesOrigin->{0.5,0}, PlotRange->All, GridLines->Automatic, GridLinesStyle->LightGray,
FrameLabel->{"Years","Yield (%)","Treasury Yield Curve on Oct 17, 2012"},
LabelStyle->{11, FontFamily -> "Arial"}];  

The plot markers disappear. I perfer to keep the (relatively unimportant) options out of posts here, showing only the data, plot function, and results. This annoyance thwarts me.

$\endgroup$
6
  • 1
    $\begingroup$ It seems to work with ListLinePlot and corresponding options (minus the Joined part). $\endgroup$ Commented Oct 21, 2012 at 17:43
  • 1
    $\begingroup$ I guess that would do the trick for my purpose, and I'll use it. But it should work with ListPlot. $\endgroup$ Commented Oct 21, 2012 at 18:02
  • $\begingroup$ I agree, hopefully you'll get a better answer. $\endgroup$ Commented Oct 21, 2012 at 18:21
  • $\begingroup$ Looks buggy, right? Seems when neither PlotRange or AxesOrigin aren't in Automatic it forgets to check PlotMarkers in the defaults? Blergh $\endgroup$
    – Rojo
    Commented Oct 21, 2012 at 21:06
  • $\begingroup$ This kind of thing has come up before. I expect to close this question as a duplicate soon, but for now I believe the standard work-around is ListPlot[curve, Options@ListPlot] $\endgroup$
    – Mr.Wizard
    Commented Oct 21, 2012 at 21:08

0

Browse other questions tagged or ask your own question.