From: Eli G. <eg...@se...> - 2005-03-07 16:36:14
|
Darren, It was my impression that savefig() only supports jpeg and png format. From the docs: http://matplotlib.sourceforge.net/matplotlib.pylab.html#-savefig savefig(*args, **kwargs) SAVEFIG(fname, dpi=150, facecolor='w', edgecolor='w', orientation='portrait'): Save the current figure to filename fname. dpi is the resolution in dots per inch. Output file types currently supported are jpeg and png and will be deduced by the extension to fname Also I guess I'm not clear if saving to PS/EPS format actually creates a line drawing/ vector image or just creates a bitmap and encapsulates the bitmap in the PS/EPS format. I'm looking to be able to save as a line drawing or vector-type format. Thanks, Eli ----- Original Message ----- From: "Darren Dale" <dd...@co...> To: <mat...@li...> Sent: Monday, March 07, 2005 10:52 AM Subject: Re: [Matplotlib-users] PS Output from WXAGG / wxPython application > Hi Eli, > > Have you tried simply calling savefig('file.eps')? You shouldnt need to > worry > about switching backends. > > Darren > > > On Monday 07 March 2005 10:37 am, Eli Glaser wrote: >> Hello all, >> >> First let me say how much I appreciate matplotlib and the matplotlib >> community. >> >> I currently have a wxPython application which embeds a matplotlib window >> using the WXAgg backend. I use this >> application to generate plots based on some simple user inputs. After I >> get the plot looking the way I like, I have >> a "Save Plot" button which basically calls >> self.canvas.print_figure(filename,...). This works great for saving to >> JPG and PNG format. What I'd like to do is be able to save to PS or EPS >> format. Is this possible? >> >> It seems like there is an switch_backend() function which might be of >> help. >> Before I go down that route, I'd like to know >> if it is possible to use the WXAgg backend for normal plotting to the >> screen and then switch_backend(PS), redraw the >> plot, save using print_figure() or savefig() to a *.ps file, and then >> switch_backend(WXAgg) to resume interactive >> plotting on the screen. >> >> Thanks, >> >> Eli >> >> >> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- > > Darren > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |