Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matplotlib 3D pan and zoom not working

When i try to use the pan and zoom tool, the plot rotates on left click and zooms from the center on right click. zooming the plot by making a rectangular selection is not working. Has somebody a clue how this problem can be solved?

like image 758
boon Avatar asked Oct 19 '22 23:10

boon


1 Answers

Looking through the source code on github, it doesn't appear that the features you are looking for are supported. Hence you are unable to zoom and/or pan using 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

Source code: https://github.com/matplotlib/matplotlib/blob/master/lib/mpl_toolkits/mplot3d/axes3d.py At the time of writing these are on lines 1017 through to 1031

like image 116
Timballisto Avatar answered Oct 27 '22 20:10

Timballisto