Skip to content

Commit 77a068c

Browse files
Put in equal aspect for gallery examples where it makes sense
1 parent 60adfbf commit 77a068c

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

examples/mplot3d/surface3d_2.py

+3
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@
2323
# Plot the surface
2424
ax.plot_surface(x, y, z)
2525

26+
# Make the axes have an equal aspect ratio
27+
ax.set_aspect('equal')
28+
2629
plt.show()

examples/mplot3d/voxels_numpy_logo.py

+1
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@ def explode(data):
4242

4343
ax = plt.figure().add_subplot(projection='3d')
4444
ax.voxels(x, y, z, filled_2, facecolors=fcolors_2, edgecolors=ecolors_2)
45+
ax.set_aspect('equal')
4546

4647
plt.show()

examples/mplot3d/voxels_rgb.py

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ def midpoints(x):
3838
facecolors=colors,
3939
edgecolors=np.clip(2*colors - 0.5, 0, 1), # brighter
4040
linewidth=0.5)
41+
ax.set_box_aspect((1, 1, 1))
42+
ax.set_aspect('equal')
4143
ax.set(xlabel='r', ylabel='g', zlabel='b')
4244

4345
plt.show()

0 commit comments

Comments
 (0)