Re: [Matplotlib-users] CMYK images

2010-08-26 Thread Jae-Joon Lee
While not a full solution, I have been playing with a ps backend that saves images (and only images) in CMYK color. lcms is required for color transform. http://github.com/leejjoon/mpl_ps_cmyk For example, import mpl_toolkits.ps_cmyk plt.savefig("test_cmyk.eps", format="eps_cmyk") Regards, -JJ

Re: [Matplotlib-users] CMYK images

2010-08-26 Thread Robert Kern
On 8/26/10 3:26 PM, Fernando Perez wrote: > On Thu, Aug 26, 2010 at 11:39 AM, Eric Firing wrote: >> It's not trivial. This might help: >> >> http://www.littlecms.com/ >> >> See the tutorial for some nice background info. > > And this could be a good start for a python-based workflow: > > http://w

Re: [Matplotlib-users] CMYK images

2010-08-26 Thread Christopher Barker
Fernando Perez wrote: >> http://www.littlecms.com/ PIL optionally uses littlecms -- so it may have what you need built in. -Chris NOTE: I haven't read the rest of this thread, to sorry if this is redundant information. -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division

Re: [Matplotlib-users] CMYK images

2010-08-26 Thread Fernando Perez
On Thu, Aug 26, 2010 at 11:39 AM, Eric Firing wrote: > It's not trivial.  This might help: > > http://www.littlecms.com/ > > See the tutorial for some nice background info. And this could be a good start for a python-based workflow: http://www.cazabon.com/pyCMS/ *if* it works (it looks old, so

[Matplotlib-users] Not scaling patches.

2010-08-26 Thread Ben Edwards
Hello, I've used matplotlib for a while but never had cause to ask a question until now. I am trying to add a patch to an axis, but would like the patch to remain the same size when, interactively, I resize the resulting figure. I am using TkAgg, and trying the following: >>> import matplotlib.pyp

Re: [Matplotlib-users] CMYK images

2010-08-26 Thread Eric Firing
On 08/26/2010 05:49 AM, Benjamin Root wrote: > On Thu, Aug 26, 2010 at 9:39 AM, Daπid > wrote: > > Image Magick and Inkscape seem to work for this. Probably the first > one is easier to automatize in batch processing. > > > Quick warning about ImageMagick and

Re: [Matplotlib-users] CMYK images

2010-08-26 Thread Benjamin Root
On Thu, Aug 26, 2010 at 11:27 AM, Jonathan Slavin wrote: > This is starting to get off topic from matplotlib, but it is relevant to > creating good EPS figures... > > When using ImageMagick to transform from to an EPS, your results will be > much improved by using the parameter "-density 288". Th

Re: [Matplotlib-users] CMYK images

2010-08-26 Thread Jonathan Slavin
This is starting to get off topic from matplotlib, but it is relevant to creating good EPS figures... When using ImageMagick to transform from to an EPS, your results will be much improved by using the parameter "-density 288". This increases the resolution (and thus results in a much bigger file

Re: [Matplotlib-users] exclude something from legend

2010-08-26 Thread Carlos Grohmann
Many thanks Tinne. That did it. On Thu, Aug 26, 2010 at 03:55, Tinne De Laet wrote: > Hi Carlos, > > On Thu, Aug 26, 2010 at 04:49, Carlos Grohmann > wrote: >> Hello all, >> >> Is there a way to tell MPL that something I plotted (like a series of >> Line2D, to create a grid) should not be co

Re: [Matplotlib-users] CMYK images

2010-08-26 Thread Benjamin Root
On Thu, Aug 26, 2010 at 9:39 AM, Daπid wrote: > Image Magick and Inkscape seem to work for this. Probably the first > one is easier to automatize in batch processing. > > Quick warning about ImageMagick and EPS files (and any other vector-based graphics format)... ImageMagick is a raster-based s

Re: [Matplotlib-users] optimal size with figsize

2010-08-26 Thread Benjamin Root
On Thu, Aug 26, 2010 at 6:55 AM, xyz wrote: > Hello, > What is the best way to create an automatically optimal size for picture > with figsize? > > from pylab import * > import matplotlib.pyplot as plt > > x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, > 20, 21, 22, 23, 2

Re: [Matplotlib-users] saving animations

2010-08-26 Thread Benjamin Root
On Thu, Aug 26, 2010 at 12:46 AM, David Pine wrote: > Ben, > > Ok, thanks, I can do that. Still, I would like to understand better how > matplotlib is works --- the animation calls remain somewhat mysterious to > me. About the only documentation I can find is that contained in the > example fil

Re: [Matplotlib-users] CMYK images

2010-08-26 Thread Michele De Stefano
Thanks. I think it will be useful to have "cookbook instructions" to perform this task on the Matplotlib web site. Meanwhile, is there anyone that can provide those instructions, please (I've not any of these tools installed yet, and I don't know them). ? 2010/8/26 Daπid : > Image Magick and Ink

Re: [Matplotlib-users] CMYK images

2010-08-26 Thread Daπid
Image Magick and Inkscape seem to work for this. Probably the first one is easier to automatize in batch processing. On Thu, Aug 26, 2010 at 4:21 PM, Michael Droettboom wrote: > matplotlib does not have any built-in support for any color spaces other > than RGB.  You would need to use an external

Re: [Matplotlib-users] My Legend keeps growing! Help

2010-08-26 Thread John Hunter
On Wed, Aug 25, 2010 at 10:47 PM, dcarroll wrote: > > I am trying make a plot that is in a loop and replots when new data is > updated. > > #IN A LOOP > >    fig = plt.figure(1,[10,10]) >    fig.clf It looks like the problem is that you are not clearing your figure. clf is a function, so you need

Re: [Matplotlib-users] CMYK images

2010-08-26 Thread Michael Droettboom
matplotlib does not have any built-in support for any color spaces other than RGB. You would need to use an external tool (if such a thing exists) to convert color spaces. Mike On 08/26/2010 10:06 AM, Michele De Stefano wrote: > Is it possible to export EPS images with the CMYK color scheme ?

[Matplotlib-users] CMYK images

2010-08-26 Thread Michele De Stefano
Is it possible to export EPS images with the CMYK color scheme ? There are several technical journals that require this format (for example Geophysiscs, one of the most important geophysical journals, The Leading Edge, and, I think, Geophysical Prospecting only to cite some of them). -- Michele

Re: [Matplotlib-users] legend missed one dataset

2010-08-26 Thread Ryan May
On Thu, Aug 26, 2010 at 6:18 AM, xyz wrote: > On 26/08/10 01:15, Benjamin Root wrote: >> I believe you are asking why the x axis starts at 2?  This is because >> matplotlib will automatically set the limits of your plot to show all >> of your data.  If you can control the axes yourself by calling

Re: [Matplotlib-users] exclude something from legend

2010-08-26 Thread Ryan May
On Thu, Aug 26, 2010 at 1:55 AM, Tinne De Laet wrote: > Hi Carlos, > > On Thu, Aug 26, 2010 at 04:49, Carlos Grohmann > wrote: >> Hello all, >> >> Is there a way to tell MPL that something I plotted (like a series of >> Line2D, to create a grid) should not be considered for the legend? >> >> I'm

Re: [Matplotlib-users] My Legend keeps growing! Help

2010-08-26 Thread Ryan May
On Thu, Aug 26, 2010 at 8:23 AM, Tinne De Laet wrote: > On Thu, Aug 26, 2010 at 05:47, dcarroll wrote: >> >> I am trying make a plot that is in a loop and replots when new data is >> updated. >> >> #IN A LOOP >> >>    fig = plt.figure(1,[10,10]) >>    fig.clf >> >>    prop = matplotlib.font_manag

Re: [Matplotlib-users] My Legend keeps growing! Help

2010-08-26 Thread Tinne De Laet
Hi , On Thu, Aug 26, 2010 at 05:47, dcarroll wrote: > > I am trying make a plot that is in a loop and replots when new data is > updated. > > #IN A LOOP > >    fig = plt.figure(1,[10,10]) >    fig.clf > >    prop = matplotlib.font_manager.FontProperties(size=8) > >    xMin = dates[1] >    xMax =

[Matplotlib-users] My Legend keeps growing! Help

2010-08-26 Thread dcarroll
I am trying make a plot that is in a loop and replots when new data is updated. #IN A LOOP fig = plt.figure(1,[10,10]) fig.clf prop = matplotlib.font_manager.FontProperties(size=8) xMin = dates[1] xMax = dates[-1] #temperature plot yMin = min(temperatureSQLD

[Matplotlib-users] optimal size with figsize

2010-08-26 Thread xyz
Hello, What is the best way to create an automatically optimal size for picture with figsize? from pylab import * import matplotlib.pyplot as plt x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29] y1 = [20, 24, 8, 4, 12, 22, 31, 25, 1

Re: [Matplotlib-users] legend missed one dataset

2010-08-26 Thread xyz
On 26/08/10 01:15, Benjamin Root wrote: > I believe you are asking why the x axis starts at 2? This is because > matplotlib will automatically set the limits of your plot to show all > of your data. If you can control the axes yourself by calling > set_xlim() and/or set_ylim(). > > ax.set_xlim