gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-01 00:32:26 26 4
gpt4 key购买 nike

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

最佳答案

查看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

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

关于Matplotlib 3D 平移和缩放不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26645335/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com