Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyplot.savefig: add support for PDF format #70

Open
felipeespic opened this issue Feb 20, 2017 · 1 comment
Open

pyplot.savefig: add support for PDF format #70

felipeespic opened this issue Feb 20, 2017 · 1 comment

Comments

@felipeespic
Copy link

Hi,

I cannot save a figure in pdf format programmatically. However I can do it from the GUI (sometimes, depending on the type of figure).

Example 1:
pl.plot(np.arange(23))
pl.savefig('fig.pdf')
Out:
AssertionError: Function 'savefig' currently supports the following formats:
bw,eps,epsf,epsi,pcx,rgb,rgba,sgi,tga,bmp,bw,eps,epsf,epsi,ico,jp2,jpeg,jpg,pcx,pic,png,ppm,rgb,rgba,sgi,tga,tif,tiff,webp,xbm,xpm,xv

However, the description of the function pl.savefig says: "Currently supports PDF and PNG formats only"

Example 2:
pl.plot(np.arange(23))
pl.savefig('fig.pdf', format='pdf')
Out:
self.print_(printer)
File "/usr/local/lib/python2.7/dist-packages/guiqwt-3.0.2-py2.7-linux-x86_64.egg/guiqwt/pyplot.py", line 289, in print_ax.widget.print_(paint, QRect(ox, oy, w, h))
TypeError: print_() takes exactly 2 arguments (3 given)

Thanks,
Felipe

@PierreRaybaut PierreRaybaut changed the title Cannot save figure in PDF format pyplot.savefig: add support for PDF format Jun 5, 2022
@PierreRaybaut
Copy link
Collaborator

That would be a feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants