Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Saving issue with pdf backend #17599

Closed
Milestone
@ericpre

Description

@ericpre

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

image

Expected outcome
image

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp