Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to scale axes in mplot3d

I can't seem to find documentation regarding the ability to scale axes in a 3d image using matplotlib.

For example, I have the image:

3dplot And the axes have different scales. I would like them to be uniform.

like image 566
Chris Avatar asked Jul 02 '12 20:07

Chris


1 Answers

Usually it is easiest for you to include some of the code that generated the image, so we can see what you've tried and also the general setup of your code. That being said, the inclusion of the following should work:

from mpl_toolkits.mplot3d import Axes3D from matplotlib import pyplot as plt  fig = plt.figure() ax = Axes3D(fig) ax.set_xlim3d(0, 1000) ax.set_ylim3d(0, 1000) ax.set_zlim3d(0, 1000) 
like image 120
cosmosis Avatar answered Sep 27 '22 22:09

cosmosis