Closed
Description
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.