Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
Bug report
Bug summary
The animated artists are missing when saving a figure with the pdf backend (matplotlib 3.0.0 and more recent). The png backend is working fine.
Code for reproduction
# Paste your code hereimportmatplotlib.pyplotaspltimportnumpyasnpx=np.linspace(0,2*np.pi,100)fig,ax=plt.subplots()(ln,)=ax.plot(x,np.sin(x),animated=True)plt.show(block=False)plt.pause(0.1)bg=fig.canvas.copy_from_bbox(fig.bbox)ax.draw_artist(ln)fig.canvas.blit(fig.bbox)plt.savefig('Trial.pdf')
Actual outcome
Saving using the following works fine:
# This is working finefrommatplotlib.backends.backend_pdfimportPdfPageswithPdfPages('Trial.pdf')aspdf:pdf.savefig()
Matplotlib version
- Operating system: linux
- Matplotlib version: 3.0.0 and above
- Matplotlib backend (
print(matplotlib.get_backend())
): 'Qt5Agg' - Python version: 3.7.7
- Jupyter version (if applicable):
- Other libraries:
Metadata
Metadata
Assignees
Labels
No labels