Re: [Matplotlib-users] CMYK

2013-01-31 Thread Dieter
Thanks everybody for the input. As I see the answer is no, but it could be
implemented.

I did an extensive search, but I even struggle to find a good and practical
solution how to convert a VECTORPLOT RGB to CMYK on a linux system. (One way
I often found would be the Adobe suits, which I do not have.) I gave
mpl_ps_cmyk a go, but execution failed, and the page looks dated.
Furthermore, Adobes seems to provide ICCs only for Windows and Mac, but not
for Linux. ImageMagick rasterizes the figure, the same with GIMP.

I agree that this should be done on the publisher's side, but as a matter of
fact it is the requirement of some journals.

Is there really no practical way to do this? How do others convert RGB plots
to CMYK? (Importing my data into Matlab and plotting them there cannot be
the only possibility!)

Thanks everybody again, much appreciated!
Dieter



--
View this message in context: 
http://matplotlib.1069221.n5.nabble.com/CMYK-tp40352p40379.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] CMYK

2013-01-31 Thread Benjamin Root
On Thu, Jan 31, 2013 at 12:08 PM, Dieter dieter.werthmul...@ed.ac.ukwrote:



 Is there really no practical way to do this? How do others convert RGB
 plots
 to CMYK? (Importing my data into Matlab and plotting them there cannot be
 the only possibility!)


Funny story about that.  I was submitting an article to an IEEE journal
once.  IEEE's submission process for images gives back fairly useful error
messages, and it told me that my images (that I generated from matplotlib)
needed to be in CMYK format.  I had access to Adobe Illustrator on my
wife's computer, and used its tools to convert those files to CMYK, and
resubmitted it to IEEE's submission page.  The error message I got back?
Images need to be in RGB format

I forget what I did to resolve this problem (I think I did some funky
eps--ps--pdf--eps thing, I don't remember), but what I submitted was
certainly RGB, so, go figure...

Cheers!
Ben Root
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] CMYK

2013-01-31 Thread Alan G Isaac
On 1/31/2013 12:55 PM, Benjamin Root wrote:
 I was submitting an article to an IEEE journal once.  IEEE's submission 
 process for images gives back fairly useful error messages, and it told me
 that my images (that I generated from matplotlib) needed to be in CMYK 
 format.  I had access to Adobe Illustrator on my wife's computer, and used its
 tools to convert those files to CMYK, and resubmitted it to IEEE's submission 
 page.  The error message I got back?  Images need to be in RGB format


http://matplotlib.org/users/whats_new.html#pgf-tikz-backend

fwiw,
Alan Isaac

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problem with PatchCollection and FancyArrowPatch?

2013-01-31 Thread Jae-Joon Lee
FancyArrowPatch behaves quite differently from normal patches.
Most importantly, the path must be reevaluated during the drawing time, so
a normal PatchCollection, which evaluate the paths during the instance
creation, won't work. i.e., you need a new Collection class.

Below is a very incomplete implementation of FancyArrowPatchCollection,
just for a demonstration purpose. And I recommend you to open a wishlist
ticket at the issue tracker (https://github.com/matplotlib/matplotlib/issues
).

Regards,

-JJ


class FancyArrowPatchCollection(PatchCollection):
def set_paths(self, patches):
self._patches = patches

def get_paths(self):
paths = []
for p in self._patches:
p.set_transform(self.get_transform())
_path, fillable = p.get_path_in_displaycoord()
paths.extend(_path)
return paths

def _prepare_points(self):
import matplotlib.transforms as mtransforms
transform, transOffset, offsets, paths =
PatchCollection._prepare_points(self)
return mtransforms.IdentityTransform(), transOffset, offsets, paths




On Thu, Jan 31, 2013 at 6:33 AM, Skipper Seabold jsseab...@gmail.comwrote:

 Hi,

 Trying to figure out why these two do not create the same plot. Bug or
 user error?

 import matplotlib.pyplot as plt
 from matplotlib.patches import FancyArrowPatch
 from matplotlib.collections import PatchCollection

 def correct_patch(pos):
 fig, ax = plt.subplots()
 for src, dst in pos:
 arrow = FancyArrowPatch(posA=src, posB=dst,
 color='k', arrowstyle='-|',
 mutation_scale=30, connectionstyle=arc3)
 ax.add_patch(arrow)
 return fig

 def patch_collection_problem(pos):
 fig, ax = plt.subplots()
 pos = [[(.5, .5), (.25, .25)],
[(.1, .5), (.2, .75)]]
 arrows = []
 for src, dst in pos:
 arrows.append(FancyArrowPatch(posA=src, posB=dst,
 color='k', arrowstyle='-|',
 mutation_scale=30, connectionstyle=arc3))
 collection = PatchCollection(arrows, match_original=True)

 ax.add_collection(collection, autolim=False)
 return fig

 pos = [[(.5, .5), (.25, .25)],
   [(.1, .5), (.2, .75)]]

 correct_patch(pos)
 patch_collection_problem(pos)


 --
 Everyone hates slow websites. So do we.
 Make your web apps faster with AppDynamics
 Download AppDynamics Lite for free today:
 http://p.sf.net/sfu/appdyn_d2d_jan
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users