[Date Index]
[Thread Index]
[Author Index]
Re: New definition of the Plot preference
*To*: mathgroup at smc.vnet.net
*Subject*: [mg92407] Re: New definition of the Plot preference
*From*: Szabolcs Horvát <szhorvat at gmail.com>
*Date*: Tue, 30 Sep 2008 21:47:13 -0400 (EDT)
*Organization*: University of Bergen
*References*: <gbt2s4$len$1@smc.vnet.net>
Yiping Huang wrote:
> I feel tired to give every parameters again and again in the Plot[,PlotStyle->...] command.
> Are there any method that I can set the parameters as I want. All I need to do is (List)Plot[data], and the figure can show as what I want it to be?
>
> I try one way to redefine the Plot function,
> ListPlott[data_]:=ListPlot[data,{Parameters I want.}];
> The problem of the above definition is that I can't change the label of axes easily. So it is almost useless...
>
> Are there any smarter way to redefine the command, maybe like
> Plott["label of x axis","label of y axis",data_]:=...and I can use a more convenient command
>
Yes, you can change the default options for Plot or other functions:
oldPlotOptions = Options[Plot] (* save the original settings *)
SetOptions[Plot, PlotStyle -> Red]
Plot[{Sin[x], Cos[x]}, {x,0,10}] (* both curves are red now *)
SetOptions[Plot, oldPlotOptions] (* restore original settings *)
Prev by Date:
**Re: New definition of the Plot preference**
Next by Date:
**Re: help with new symbols (or pointers)**
Previous by thread:
**Re: New definition of the Plot preference**
Next by thread:
**Is there any simplier way to plot in a specific style?**
| |