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

Reset view not working in interactive TkAgg backend #9764

Copy link
Copy link
Closed
@j4321

Description

@j4321
Issue body actions

Bug report

When using TkAgg in interactive mode, the 'reset view' and 'back to previous view' buttons do not work. However, everything works fine when I am not in interactive mode or using Qt5Agg.

Code for reproduction

import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
plt.ion()
plt.plot(range(10))

Then I zoom in and click on 'reset view' / 'back to previous view' and nothing happens. This happens both in the python command line and the jupyter qt console.

However, if I do the same but with

import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
plt.ioff()
plt.plot(range(10))
plt.show()

then both buttons work. It is specific to the TkAgg backend because the interactive mode works fine with Qt5Agg.

Matplotlib version

  • Operating system: Archlinux
  • Matplotlib version: 2.1.0
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg
  • Python version: 3.6.3
  • Jupyter version (if applicable): 4.1.0

I installed python and matplotlib from the official archlinux repository.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    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.