如何创建已在matplotlib中缩放一次的新绘图?

如何创建已在matplotlib中缩放一次的新绘图?,matplotlib,Matplotlib,我想创建一个已经缩放过一次的新绘图。这意味着,如果我点击主页按钮,它将返回完整视图。 这类似于使用“长方体缩放”按钮,但以编程方式进行。 大概是这样的: fig, axes = plt.subplots() axes.plot(range(10)) # just some plot axes.set_zoomed_xlim(3,7) #different from set_xlim because you can see the whole plot if you hit Home 你们知道这

我想创建一个已经缩放过一次的新绘图。这意味着,如果我点击主页按钮,它将返回完整视图。 这类似于使用“长方体缩放”按钮,但以编程方式进行。 大概是这样的:

fig, axes = plt.subplots()
axes.plot(range(10)) # just some plot
axes.set_zoomed_xlim(3,7) #different from set_xlim because you can see the whole plot if you hit Home
你们知道这种魔术吗

谢谢

看看谁在做一些与历史有关的事情。mpl还没有很好地支持这一点!。