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

Appearance settings

Animation._end_redraw() issue with event-driven animation #9153

Copy link
Copy link
Closed as not planned
@wombatonfire

Description

@wombatonfire
Issue body actions

Bug report

Bug summary

Animation._end_redraw() method, which is called after window resizing, always calls self._post_draw() with blit=False:

def _end_redraw(self, evt):
    # Now that the redraw has happened, do the post draw flushing and
    # blit handling. Then re-enable all of the original events.
    self._post_draw(None, False)
    self.event_source.start()
    self._fig.canvas.mpl_disconnect(self._resize_id)
    self._resize_id = self._fig.canvas.mpl_connect('resize_event',
                                                   self._handle_resize)

self._fig.canvas.draw_idle() is used directly in this case, and self._drawn_artists is ignored. In a scenario where the plot is updated only when new data points arrive, this leads to a blank window after resize and until you get new data point and a plot update function is executed.

Of course, I can override this behaviour, but the question is why not to call self._post_draw() here as it is called from other places:

self._post_draw(None, self._blit)

Doing this will respect already drawn artists if you resize the window before new data points arrive.

Matplotlib version

  • Operating System: Windows 10
  • Matplotlib Version: 2.0.2
  • Python Version: 2.7.13

Matplotlib and Python are installed as part of Anaconda 4.4.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Action

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.