Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 69644dc

Browse files
authored
Merge pull request #23773 from meeseeksmachine/auto-backport-of-pr-23772-on-v3.6.x
Backport PR #23772 on branch v3.6.x (3d plots what's new cleanups)
2 parents 6d0cb05 + 6fe2828 commit 69644dc

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

doc/users/next_whats_new/3d_plot_aspects.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Users can set the aspect ratio for the X, Y, Z axes of a 3D plot to be 'equal',
2727
for i, ax in enumerate(axs):
2828
ax.set_box_aspect((3, 4, 5))
2929
ax.set_aspect(aspects[i])
30-
ax.set_title("set_aspect('{aspects[i]}')")
30+
ax.set_title(f"set_aspect('{aspects[i]}')")
3131

32+
fig.set_size_inches(13, 3)
3233
plt.show()

doc/users/next_whats_new/3d_plot_focal_length.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ The focal length can be calculated from a desired FOV via the equation:
1919

2020
from mpl_toolkits.mplot3d import axes3d
2121
import matplotlib.pyplot as plt
22-
fig, axs = plt.subplots(1, 3, subplot_kw={'projection': '3d'},
23-
constrained_layout=True)
22+
from numpy import inf
23+
fig, axs = plt.subplots(1, 3, subplot_kw={'projection': '3d'})
2424
X, Y, Z = axes3d.get_test_data(0.05)
25-
focal_lengths = [0.25, 1, 4]
25+
focal_lengths = [0.2, 1, inf]
2626
for ax, fl in zip(axs, focal_lengths):
2727
ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10)
2828
ax.set_proj_type('persp', focal_length=fl)
2929
ax.set_title(f"focal_length = {fl}")
30-
plt.tight_layout()
30+
fig.set_size_inches(10, 4)
3131
plt.show()

doc/users/next_whats_new/3d_plot_roll_angle.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ existing 3D plots.
1818
X, Y, Z = axes3d.get_test_data(0.05)
1919
ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10)
2020
ax.view_init(elev=0, azim=0, roll=30)
21+
ax.set_title('elev=0, azim=0, roll=30')
2122
plt.show()

0 commit comments

Comments
 (0)