MathGroup Archive 2005

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

Search the Archive

Re: list of options in Plot

  • To: mathgroup at
  • Subject: [mg61903] Re: list of options in Plot
  • From: Helen Read <read at>
  • Date: Fri, 4 Nov 2005 05:11:23 -0500 (EST)
  • Organization: EM Computer Facility, The University of Vermont
  • References: <dkcnrb$q81$>
  • Sender: owner-wri-mathgroup at

pieter.eendebak at wrote:

> Hi!
> I need to plot functions with the same options all over again. For
> example
> Plot[ x^2, {x,0,1}, PlotStyle->RBGColor[1,0,0], Ticks->None]
> Plot[ x^3, {x,0,1}, PlotStyle->RBGColor[1,0,0], Ticks->None]
> Plot[ x^4, {x,0,1}, PlotStyle->RBGColor[1,0,0], Ticks->None]
> I would like to shorten this to
> options={PlotStyle->RBGColor[1,0,0], Ticks->None}
> Plot[x^2, {x,0,1}, options]
> Plot[x^3, {x,0,1}, options]
> Plot[x^4, {x,0,1}, options]
> The code above does not work, I need some `unlist' function for the
> options.  Can someone tell me how to do this in Mathematica?

Why not define a function do it?

p[f_, {x_,a_, b_}] := Plot[f, {x, a, b},
   PlotStyle -> RGBColor[1, 0, 0], Ticks -> None]





And so forth.

Helen Read
University of Vermont

  • Prev by Date: Re: A Problem with Integrate
  • Next by Date: Re: list of options in Plot
  • Previous by thread: Re: list of options in Plot
  • Next by thread: Re: list of options in Plot