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

Artists not in Axes can not be animated with blit=True by FuncAnimation #11135

Closed as not planned
Labels
@bersbersbers

Description

@bersbersbers

Bug report

Bug summary

Text cannot be animated with blit=True. Code works fine with blit=False.

Code for reproduction

importmatplotlib.animationimportmatplotlib.pyplotAnimation=matplotlib.animation.FuncAnimation(matplotlib.pyplot.figure(),lambdax: (matplotlib.pyplot.suptitle(int(x)),),frames=1,blit=True)matplotlib.pyplot.show(block=True)

Actual outcome
This error:

Exception in Tkinter callbackTraceback (most recent call last):  File "C:\Program Files\Python36\lib\tkinter\__init__.py", line 1702, in __call__    return self.func(*args)  File "C:\Program Files\Python36\lib\tkinter\__init__.py", line 746, in callit    func(*args)  File "C:\Program Files\Python36\lib\site-packages\matplotlib\backends\_backend_tk.py", line 88, in _on_timer    TimerBase._on_timer(self)  File "C:\Program Files\Python36\lib\site-packages\matplotlib\backend_bases.py", line 1373, in _on_timer    ret = func(*args, **kwargs)  File "C:\Program Files\Python36\lib\site-packages\matplotlib\animation.py", line 1481, in _step    still_going = Animation._step(self, *args)  File "C:\Program Files\Python36\lib\site-packages\matplotlib\animation.py", line 1217, in _step    self._draw_next_frame(framedata, self._blit)  File "C:\Program Files\Python36\lib\site-packages\matplotlib\animation.py", line 1237, in _draw_next_frame    self._post_draw(framedata, blit)  File "C:\Program Files\Python36\lib\site-packages\matplotlib\animation.py", line 1260, in _post_draw    self._blit_draw(self._drawn_artists, self._blit_cache)  File "C:\Program Files\Python36\lib\site-packages\matplotlib\animation.py", line 1274, in _blit_draw    bg_cache[a.axes] = a.figure.canvas.copy_from_bbox(a.axes.bbox)AttributeError: 'NoneType' object has no attribute 'bbox'

Expected outcome

A plot with suptitle 0.

Matplotlib version

  • Operating system: Windows 10
  • Matplotlib version: matplotlib==2.2.2
  • Matplotlib backend: TkAgg
  • Python version: 3.6.5
  • Jupyter version (if applicable): none
  • Other libraries:

Python fromhttps://www.python.org/
Matplotlib using pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp