Mathematica 9 is now available
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

Global Variables in Options?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80559] Global Variables in Options?
  • From: AES <siegman at stanford.edu>
  • Date: Sun, 26 Aug 2007 03:02:13 -0400 (EDT)
  • Organization: Stanford University

Can Options contain global variables?  (in 5.2)

For example, can I do

      SetOptions[Plot, TextStyle->{FontSize->myFontSize}];

      (* with no numerical value yet assigned to myFontSize *)

and then later on in the notebook write

      myFontSize = 14; Plot[ <<first plot>> ];

      myFontSize = 16; Plot[ <<second plot>> ];

Or must I structure this as

      myFontSize = 14; 
      SetOptions[Plot, TextStyle->{FontSize->myFontSize}];
      Plot[ <<first plot>> ];

      myFontSize = 16; 
      SetOptions[Plot, TextStyle->{FontSize->myFontSize}];
      Plot[ <<second plot>> ];


  • Prev by Date: Improper Integral & Mathematica
  • Next by Date: Cell brackets on left ?
  • Previous by thread: Re: Improper Integral & Mathematica
  • Next by thread: Cell brackets on left ?