-1

Consider the case where a maplotlib 3d plot have 2 axis that represents the same kind of measurement (for example a length) and another one of a different kind (for example time). I would like to scale only 2 axis (the ones representing the length) but not the other one. In a 2d plot I would do this with ax.axis("equal"), but this command scales all the axis.

Is there a way to do that?

roschach
  • 8,390
  • 14
  • 74
  • 124

1 Answers1

1

The Axes3D class has a set_aspect method, which allows you to set the aspect ratio of any pair of axes to equal, e.g.:

ax.set_apect("equalxy")

to set the x-y axes to have equal aspect ratios, but leaving the z-axis scale unchanged.

Matt Pitkin
  • 3,989
  • 1
  • 18
  • 32