MathGroup Archive 2008

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

Search the Archive

Re: Is there any simplier way to plot in a specific style?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92422] Re: Is there any simplier way to plot in a specific style?
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Tue, 30 Sep 2008 21:49:59 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <gbt2rp$led$1@smc.vnet.net>

Yiping Huang wrote:

> Every time I plot the figure, I need to give a lot of parameters to make sure the plot can show with specific format. I feel it is not so convenient for me. 
> 
> I try to create another plot function, the new definition looks like:
> 
> Plott[data_]:=Plot[data,{specific format}]
> 
> However, it is still not so convenient, because I need to change the axes label for x,y axes. I don't know how to create a function with input contain string. How to create a function defined as:
> 
> Plott[data_,"label x","label y"]=Plot[data_,...]
> 
> So that I can input string and the data I want to create the figure with specific format.

Maybe the following will help:

     Plott[data_, labelX_String, labelY_String] :=
      Plot[Evaluate[Sequence @@ data], AxesLabel -> {labelX, labelY}]

     Plott[{Sin[x], {x, 1, 10}}, "x vals", "y vals"]

> Is there any way can simplify the plot command? Or to have an systematic way to create plots with specific format?

You should have a look at the built-in function *SetOptions*

http://reference.wolfram.com/mathematica/ref/SetOptions.html


Regards,
-- Jean-Marc


  • Prev by Date: Re: help with new symbols (or pointers)
  • Next by Date: BTopTools for Mathematica extends data acquisition capabilities to the lab environment
  • Previous by thread: Is there any simplier way to plot in a specific style?
  • Next by thread: Re: Is there any simplier way to plot in a specific style?