Matplotlib 3D 平移和缩放不起作用

boo*_*oon 5 matplotlib mplot3d

当我尝试使用平移和缩放工具时,绘图会在左键单击时旋转并在右键单击时从中心缩放。通过选择矩形来缩放绘图不起作用。有人知道如何解决这个问题吗?

Tim*_*sto 3

查看github上的源代码,似乎不支持您正在寻找的功能。因此,您无法使用缩放和平移mplot3d.Axes3D

def can_zoom(self) :
"""
Return *True* if this axes supports the zoom box button functionality.
3D axes objects do not use the zoom box button.
"""
return False

def can_pan(self) :
"""
Return *True* if this axes supports the pan/zoom button functionality.
3D axes objects do not use the pan/zoom button.
"""
return False
Run Code Online (Sandbox Code Playgroud)

源代码: https: //github.com/matplotlib/matplotlib/blob/master/lib/mpl_toolkits/mplot3d/axes3d.py 在撰写本文时,这些位于第 1017 行到 1031 行