Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Setting plot options with RuleDelayed/Rule does not work

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80172] Re: Setting plot options with RuleDelayed/Rule does not work
  • From: Markus Huber <mhla at gmx.at>
  • Date: Tue, 14 Aug 2007 07:02:23 -0400 (EDT)
  • References: <f9jl98$3e7$1@smc.vnet.net><f9mpsv$qsh$1@smc.vnet.net>

>
> Sorry but I can't understand what you want.
> Can you give an example about how you
> plan to use
>
> > SetOptions[Plot, Background :>Red]
>
> in your application?
>
> Dimitris

I tried to make up a simple example because the whole thing is part of
something bigger. Sorry I was not clear on what is the purpose.

What I want is to set the Background option of Plot to a certain
color, but it should be not a fixed one. So I set the Background
option to $MyColor:

SetOptions[Plot, Background :>$MyColor]

The sense of using RuleDelayed is of course that M should check the
value of $MyColor every time it is needed. Using Rule fixes the
Backgound color of Plot to the value of $MyColor it has when
evaluating

SetOptions[Plot, Background ->$MyColor]

So using RuleDelayed should make it possible ot change the value of
$MyColor and then Plot produces plots with the Background in the color
$MyColor.
If I did not want it to be possible to change the value of $MyColor, I
would use Rule. But since I want to use it and and I futhermore want
to understand why M behaves this way (if it is not a bug), I posted it
in the Mathgroup.

So all in all: Why does it not work to assign a color with RuleDelayed
to the Background option of Plot?


Regards,
Markus Huber



  • Prev by Date: Re: Nested Dialogs
  • Next by Date: Re: reading from file
  • Previous by thread: Re: Setting plot options with RuleDelayed/Rule does not work
  • Next by thread: rotation angles from rotation matrix