Setting plot options with RuleDelayed/Rule does not work
- To: mathgroup at smc.vnet.net
- Subject: [mg80057] Setting plot options with RuleDelayed/Rule does not work
- From: Markus Huber <mhla at gmx.at>
- Date: Sat, 11 Aug 2007 02:17:24 -0400 (EDT)
Hello,
I discovered the following behavior of Mathematica which I do not
understand concerning options of plot commands:
I want to set the Background option for Plot to a color using
RuleDelayed (I want to use RuleDelayed because instead of Red I plan
on using a variable), e.g.
SetOptions[Plot, Background :> Red]
This does not work when using Plot:
Plot[x, {x, 0, 1}]
plots something but gives the error "The specified setting for
GraphicsBoxOptions, Background cannot be used".
Interestingly
Plot[x, {x, 0, 1},Background:>Red]
as well as (Rule instead of RuleDelayed)
SetOptions[Plot, Background -> Red]
Plot[x, {x, 0, 1}]
work. What confuses me also is the fact that for other Options this
proble does not occur, e.g. I tried it with PlotLabel. ListPlot also
shows this behavior (and I guess more plot functions).
Can anybody explain this behavior or it is a bug in M6?
Regards,
Markus Huber