From: Eli G. <eg...@se...> - 2005-03-07 19:32:03
|
>> 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 > > I agree that is a little misleading, but keep reading: > > orientation is either 'landscape' or 'portrait' - not supported on > all backends; currently only on postscript output. > > savefig works for ps and eps, I use it all the time without changing > backends. > Ok I tried that out and I am able to save ps files without doing any backend switching. Thanks for the tip! >> 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. > > I dont think it is a bitmap, but I will let someone more knowledgable > speak to > that. Can anyone confirm or deny this? It seems to me that it is saving out in a rasterized version encapsulated in the postscript format. I tried saving a simple plot in both PNG and PS format - the PNG is 77 kb and the PS is 623 kb. The plot only has 3 curves and a legend so I'm guessing its being rasterized in the PS format. I guess my real question is: is it possible to save a matplotlib plot in a vector-based format? Thanks, Eli |