Matplotlib Zoom Level Stepping Back On Key Press Event
I want to choose a zone in my matplotlib figure by zooming into the figure then, when the key 'c' is pressed, getting the current axes limits. However, on key press event, the figu
Solution 1:
The answer is due to the key c
being part of the interactive navigation hotkey.
The solution is simple: re-configure the keymap related to back.
import matplotlib as mpl
...
if__name__== "__main__":
fig, ax = plt.subplots()
mpl.rcParams["keymap.back"] = ['left', 'backspace']
ax.plot([0,1,2,3,4,5,4,3])
cropfinder = CropZoneFinder(fig)
Post a Comment for "Matplotlib Zoom Level Stepping Back On Key Press Event"