From: jakobg <jak...@ho...> - 2009-09-01 15:09:39
|
Hi there, I want to place an eps graphic I created in Inkscape in a plot. The final image is supposed to be a vector eps as well. I looked up the forum but just found the option with the Image (PIL) library which obviously rasterizes my vector image. And I use the Tex option so I cannot just save as SVG and do the compositing stuff in Inkscape. The placing of the image is straight forward and fine documented (with additional axes and imshow), so it is just a problem of importing a eps vector image. I would be very grateful if someone could help me with this issue. Thanks! Jakob -- View this message in context: http://www.nabble.com/Placing-vector-eps-graphics-tp25242043p25242043.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Michael D. <md...@st...> - 2009-09-01 15:28:29
|
Unfortunately, matplotlib doesn't support importing vector images of any sort. Your best bet is to, as you suggest, do the compositing in an external tool, such as Inkscape. Version 0.46 and later claim to support PDF import, you could try that. (Though I haven't tried it with a matplotlib plot personally, so no promises...) Cheers, Mike jakobg wrote: > Hi there, > > I want to place an eps graphic I created in Inkscape in a plot. The final > image is supposed to be a vector eps as well. I looked up the forum but just > found the option with the Image (PIL) library which obviously rasterizes my > vector image. And I use the Tex option so I cannot just save as SVG and do > the compositing stuff in Inkscape. > > The placing of the image is straight forward and fine documented (with > additional axes and imshow), so it is just a problem of importing a eps > vector image. > > I would be very grateful if someone could help me with this issue. > > Thanks! > Jakob > > > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: Jae-Joon L. <lee...@gm...> - 2009-09-01 15:33:51
|
You may use PyX for compositing two eps images. It is not a gui application like inkscape. But it is one of the best option I know for eps compositing. http://pyx.sourceforge.net/manual/epsfile.html Regards, -JJ On Tue, Sep 1, 2009 at 11:09 AM, jakobg<jak...@ho...> wrote: > > Hi there, > > I want to place an eps graphic I created in Inkscape in a plot. The final > image is supposed to be a vector eps as well. I looked up the forum but just > found the option with the Image (PIL) library which obviously rasterizes my > vector image. And I use the Tex option so I cannot just save as SVG and do > the compositing stuff in Inkscape. > > The placing of the image is straight forward and fine documented (with > additional axes and imshow), so it is just a problem of importing a eps > vector image. > > I would be very grateful if someone could help me with this issue. > > Thanks! > Jakob > > > > -- > View this message in context: http://www.nabble.com/Placing-vector-eps-graphics-tp25242043p25242043.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Andrew S. <str...@as...> - 2009-09-01 15:42:00
|
jakobg wrote: > Hi there, > > I want to place an eps graphic I created in Inkscape in a plot. The final > image is supposed to be a vector eps as well. I looked up the forum but just > found the option with the Image (PIL) library which obviously rasterizes my > vector image. And I use the Tex option so I cannot just save as SVG and do > the compositing stuff in Inkscape. > > The placing of the image is straight forward and fine documented (with > additional axes and imshow), so it is just a problem of importing a eps > vector image. > > I would be very grateful if someone could help me with this issue. > It you could save from inkscape as .svg instead of .eps, you might be able to modify Jae-Joon's trick to directly include this svg into a matplotlib-generated svg file. See http://abitofpythonabitofastronomy.blogspot.com/2009/02/mpl-w-svg-filter-again.html . |
From: jakobg <jak...@ho...> - 2009-09-01 16:26:45
|
Thanks all for the fast reply. The tip with PyX is working fine! So its very easy to combine different eps files! If someone is interested, try something like: from pyx import * c = canvas.canvas() c.insert(epsfile.epsfile(0, 0, "1.eps")) c.insert(epsfile.epsfile(0.5,0.2,"2.eps",scale=0.5)) c.writeEPSfile("output") Thats all! Ciao Jakob -- View this message in context: http://www.nabble.com/Placing-vector-eps-graphics-tp25242043p25243516.html Sent from the matplotlib - users mailing list archive at Nabble.com. |