Different plot settings for different circumstances ...

Hi guys,

I generally use matplotlib it extract information from raw data and
use this for plotting. I wonder what most of you guys out there use it
for?

But, anyways the point of this mail is to ask if there is a clever way
of making different plots for different circumstances. For example,
trying to make a plot for publication in a journal demands it being
made in one way while using it in a presentation demands you to make a
different one and probably trying to use it in a report requires
another one.

So, is there a way to decouple the plot settings (like figure size,
axes properties, tick properties, etc) from the data being plotted. If
so, can someone give some examples.

Cheers,
Chaitanya

http://matplotlib.sourceforge.net/users/customizing.html

hth,
Alan Isaac

···

On 4/21/2009 1:49 PM Chaitanya Krishna apparently wrote:

So, is there a way to decouple the plot settings (like figure size,
axes properties, tick properties, etc) from the data being plotted. If
so, can someone give some examples.

But, anyways the point of this mail is to ask if there is a clever way
of making different plots for different circumstances. For example,
trying to make a plot for publication in a journal demands it being
made in one way while using it in a presentation demands you to make a
different one and probably trying to use it in a report requires
another one.

So, is there a way to decouple the plot settings (like figure size,
axes properties, tick properties, etc) from the data being plotted. If
so, can someone give some examples.

Here's another example from the matplotlib docs that sounds more like what you're looking for:

http://matplotlib.sourceforge.net/examples/pylab_examples/customize_rc.html?highlight=set_pub

I use something similar to the ``set_pub`` method in the comments of the example. I have a module ``plotstyle`` which has methods for ``presentation``, ``publication``, etc. and whenever I want a script to use a certain style I just add:

>>> import plotstyle
>>> plotstyle.presention()

Best,
-Tony

···

On Apr 21, 2009, at 1:49 PM, Chaitanya Krishna wrote: