Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: list of options in Plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61898] Re: [mg61879] list of options in Plot
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 4 Nov 2005 05:11:19 -0500 (EST)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

options={PlotStyle->RGBColor[1,0,0],Ticks->None};
Plot[x^2,{x,0,1},Evaluate[Sequence@@options]];
Plot[x^3,{x,0,1},Evaluate[Sequence@@options]];
Plot[x^4,{x,0,1},Evaluate[Sequence@@options]];

options=Sequence[PlotStyle->RGBColor[1,0,0],Ticks->None];
Plot[x^2,{x,0,1},Evaluate[options]];
Plot[x^3,{x,0,1},Evaluate[options]];
Plot[x^4,{x,0,1},Evaluate[options]];

Plot[#,{x,0,1},
        PlotStyle->RGBColor[1,0,0],Ticks->None]&/@
    {x^2,x^3,x^4};


Bob Hanlon

> 
> From: pieter.eendebak at gmail.com
To: mathgroup at smc.vnet.net
> Date: 2005/11/03 Thu AM 04:58:48 EST
> Subject: [mg61898] [mg61879] list of options in Plot
> 
> 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?
> 
> thanks,
> pieter
> 
> 


  • Prev by Date: Re: help on kind of 'inverse exponential' function ?
  • Next by Date: Re: Mean of skew-normal distribution
  • Previous by thread: Re: list of options in Plot
  • Next by thread: Re: list of options in Plot