MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

"Sticky" options when using Plot[] -- bug or feature?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99403] "Sticky" options when using Plot[] -- bug or feature?
  • From: Bob F <deepyogurt at gmail.com>
  • Date: Tue, 5 May 2009 05:40:07 -0400 (EDT)

Any idea why the first and last "Plot[Cos[x], {x, -Pi, Pi}]" below
come out so much differently? It would appear that some of the options
are a bit "sticky" in the sense that they are not reset for the second
"Plot[Cos[x], {x, -Pi, Pi}]". Is this a bug or a feature? And make
sure that you start with a fresh kernel in case something has already
been done for the first Plot[] call ...

Plot[Cos[x], {x, -Pi, Pi}]

<< PlotLegends`
bs = {FontFamily -> "Arial", FontSize -> 14, FontWeight -> Bold};
SetOptions[Plot, Frame -> True, FrameStyle -> AbsoluteThickness[2],
  GridLines -> Automatic,
  PlotStyle -> {{Red, AbsoluteThickness[2]}, {Black,
     AbsoluteThickness[2]}, {Blue,
     AbsoluteThickness[2]}, {Darker@Green, AbsoluteThickness[2]}},
  BaseStyle -> bs];
Plot[{Sin[x], Cos[x], Tan[x]}, {x, 0, 1},
 PlotStyle -> {Directive[Blue, Thick],
   Directive[Thick, Red, DotDashed], Directive[Thick, Green, Dotted]},
  Background -> LightOrange,
 PlotLegend -> {"sin x", "cos x", "tan x"},
 LegendPosition -> {-.6, 0.1}, LegendOrientation -> Vertical,
 LegendBackground -> LightPurple, LegendShadow -> {.02, -.02},
 LegendSize -> {0.3, 0.35}, FrameLabel -> {"x", "trig functions"}]

Plot[Cos[x], {x, -Pi, Pi}]

Please let me know if you find the same problem. I tried this on a Mac
OS X 10.5.6 system with version 7.0.1 of Mathematica. Thanks...

-Bob


  • Prev by Date: Re: why does DownValues not return all downvalues for a symbol?
  • Next by Date: Re: why does DownValues not return all downvalues for a
  • Previous by thread: Re: RegionPlot3d under sampling plot points?
  • Next by thread: Re: "Sticky" options when using Plot[] -- bug or feature?