From: Michele De S. <mic...@gm...> - 2010-08-26 14:13:51
|
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 De Stefano http://www.linkedin.com/in/micdestefano http://code.google.com/p/mds-utils http://micheledestefano.xoom.it |
From: Michael D. <md...@st...> - 2010-08-26 14:21:43
|
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 ? > > 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). > > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA |
From: Daπid <dav...@gm...> - 2010-08-26 14:39:45
|
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 <md...@st...> wrote: > 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 ? >> >> 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). >> >> > > > -- > Michael Droettboom > Science Software Branch > Space Telescope Science Institute > Baltimore, Maryland, USA > > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Michele De S. <mic...@gm...> - 2010-08-26 14:44:25
|
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 <dav...@gm...>: > 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 <md...@st...> wrote: >> 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 ? >>> >>> 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). >>> >>> >> >> >> -- >> Michael Droettboom >> Science Software Branch >> Space Telescope Science Institute >> Baltimore, Maryland, USA >> >> >> ------------------------------------------------------------------------------ >> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program >> Be part of this innovative community and reach millions of netbook users >> worldwide. Take advantage of special opportunities to increase revenue and >> speed time-to-market. Join now, and jumpstart your future. >> http://p.sf.net/sfu/intel-atom-d2d >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michele De Stefano http://www.linkedin.com/in/micdestefano http://code.google.com/p/mds-utils http://micheledestefano.xoom.it |
From: Benjamin R. <ben...@ou...> - 2010-08-26 15:50:23
|
On Thu, Aug 26, 2010 at 9:39 AM, Daπid <dav...@gm...> 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 system. When it loads a vector-based graphic, it implicitly rasterizes it, performs the requested operations, and then outputs the file format. So, even if you output the result as a EPS file, you would have lost all vector-based info (like text and lines). The result looks horrible. I have been contemplating adding some sort of functionality like this for the various formats. I recently ran into issues like this for an IEEE publication and had to resort to obtaining a copy of Adobe Acrobat Pro to fix up my images. It would be nice if I could pass an option to .savefig() like 'use_cmyk=True' or something and be done with it. Ben Root |
From: Eric F. <ef...@ha...> - 2010-08-26 18:39:20
|
On 08/26/2010 05:49 AM, Benjamin Root wrote: > On Thu, Aug 26, 2010 at 9:39 AM, Daπid <dav...@gm... > <mailto:dav...@gm...>> 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 system. When it loads a vector-based > graphic, it implicitly rasterizes it, performs the requested operations, > and then outputs the file format. So, even if you output the result as > a EPS file, you would have lost all vector-based info (like text and > lines). The result looks horrible. > > I have been contemplating adding some sort of functionality like this > for the various formats. I recently ran into issues like this for an > IEEE publication and had to resort to obtaining a copy of Adobe Acrobat > Pro to fix up my images. It would be nice if I could pass an option to > .savefig() like 'use_cmyk=True' or something and be done with it. It's not trivial. This might help: http://www.littlecms.com/ See the tutorial for some nice background info. Eric > > Ben Root > > > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Fernando P. <fpe...@gm...> - 2010-08-26 20:26:57
|
On Thu, Aug 26, 2010 at 11:39 AM, Eric Firing <ef...@ha...> 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 it may have bit-rotted in the meantime). Another option would be to ctypes-wrap the calls of littleCMS one needs just for this and be done with it. Not very elegant, but it might get the OP out of a bind with minimal work, and he'd have a little eps2cmyk.py script he could run on his MPL-generated EPS files for colorspace conversion. Just an afternoon hack. :) Regards, f |
From: Christopher B. <Chr...@no...> - 2010-08-26 20:59:58
|
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 NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: Robert K. <rob...@gm...> - 2010-08-26 21:15:18
|
On 8/26/10 3:26 PM, Fernando Perez wrote: > On Thu, Aug 26, 2010 at 11:39 AM, Eric Firing<ef...@ha...> 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 it may have bit-rotted in the meantime). > > Another option would be to ctypes-wrap the calls of littleCMS one > needs just for this and be done with it. Not very elegant, but it > might get the OP out of a bind with minimal work, and he'd have a > little eps2cmyk.py script he could run on his MPL-generated EPS files > for colorspace conversion. Just an afternoon hack. :) You can also use my numpy-aware wrappers: http://www.enthought.com/~rkern/cgi-bin/hgwebdir.cgi/lcms/ -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |
From: Jae-Joon L. <lee...@gm...> - 2010-08-26 21:39:13
|
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 On Fri, Aug 27, 2010 at 6:12 AM, Robert Kern <rob...@gm...> wrote: > On 8/26/10 3:26 PM, Fernando Perez wrote: >> On Thu, Aug 26, 2010 at 11:39 AM, Eric Firing<ef...@ha...> 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 it may have bit-rotted in the meantime). >> >> Another option would be to ctypes-wrap the calls of littleCMS one >> needs just for this and be done with it. Not very elegant, but it >> might get the OP out of a bind with minimal work, and he'd have a >> little eps2cmyk.py script he could run on his MPL-generated EPS files >> for colorspace conversion. Just an afternoon hack. :) > > You can also use my numpy-aware wrappers: > > http://www.enthought.com/~rkern/cgi-bin/hgwebdir.cgi/lcms/ > > -- > Robert Kern > > "I have come to believe that the whole world is an enigma, a harmless enigma > that is made terrible by our own mad attempt to interpret it as though it had > an underlying truth." > -- Umberto Eco > > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Michele De S. <mic...@gm...> - 2010-08-27 07:30:52
|
Thanks a lot to all of you. First of all, I have to say that I agree with Benjamin Root. I'll try the tools some of you suggested (no problem in installing and trying, as soon as I can ... but it's good to know that there is a way to generate CMYK images using Python ... as I told it will be useful to have these suggestions recorded on the Matplotlib web site). If amongst the readers of this mailing list there are also some Matplotlib developers, I'd like to say them that to have the CMYK option incorporated into Matplotlib (for example like it is incorporated into the MATLAB print command) will be a great improvement. I started using Python only because I wanted to stop using MATLAB. I've found Python a lot more powerful than MATLAB on nearly all aspects. When someone like me has to make some publications and does not have a lot of time to try tools, he will be discouraged in using Matplotlib (and Python) and he will return to MATLAB again (and this is what happened to me until now). So, developers, please seriously consider adding this option to Matplotlib. The first sentence of the web site is "matplotlib is a python 2D plotting library which produces publication quality figures". This is true (I think they're better than Matlab figures) ... I only hope it will be more easy in the future also to actually use those figures in publications. Thanks to all of you. Kind regards, Michele 2010/8/26 Jae-Joon Lee <lee...@gm...>: > 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 > > > > On Fri, Aug 27, 2010 at 6:12 AM, Robert Kern <rob...@gm...> wrote: >> On 8/26/10 3:26 PM, Fernando Perez wrote: >>> On Thu, Aug 26, 2010 at 11:39 AM, Eric Firing<ef...@ha...> 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 it may have bit-rotted in the meantime). >>> >>> Another option would be to ctypes-wrap the calls of littleCMS one >>> needs just for this and be done with it. Not very elegant, but it >>> might get the OP out of a bind with minimal work, and he'd have a >>> little eps2cmyk.py script he could run on his MPL-generated EPS files >>> for colorspace conversion. Just an afternoon hack. :) >> >> You can also use my numpy-aware wrappers: >> >> http://www.enthought.com/~rkern/cgi-bin/hgwebdir.cgi/lcms/ >> >> -- >> Robert Kern >> >> "I have come to believe that the whole world is an enigma, a harmless enigma >> that is made terrible by our own mad attempt to interpret it as though it had >> an underlying truth." >> -- Umberto Eco >> >> >> ------------------------------------------------------------------------------ >> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program >> Be part of this innovative community and reach millions of netbook users >> worldwide. Take advantage of special opportunities to increase revenue and >> speed time-to-market. Join now, and jumpstart your future. >> http://p.sf.net/sfu/intel-atom-d2d >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michele De Stefano http://www.linkedin.com/in/micdestefano http://code.google.com/p/mds-utils http://micheledestefano.xoom.it |