MCPcopy
hub / github.com/matplotlib/matplotlib / test_aspects

Function test_aspects

lib/mpl_toolkits/mplot3d/tests/test_axes3d.py:77–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75
76@mpl3d_image_comparison(['aspects.png'], remove_text=False, style='mpl20')
77def test_aspects():
78 aspects = ('auto', 'equal', 'equalxy', 'equalyz', 'equalxz', 'equal')
79 _, axs = plt.subplots(2, 3, subplot_kw={'projection': '3d'})
80
81 for ax in axs.flatten()[0:-1]:
82 plot_cuboid(ax, scale=[1, 1, 5])
83 # plot a cube as well to cover github #25443
84 plot_cuboid(axs[1][2], scale=[1, 1, 1])
85
86 for i, ax in enumerate(axs.flatten()):
87 ax.set_title(aspects[i])
88 ax.set_box_aspect((3, 4, 5))
89 ax.set_aspect(aspects[i], adjustable='datalim')
90 axs[1][2].set_title('equal (cube)')
91
92
93@mpl3d_image_comparison(['aspects_adjust_box.png'],

Callers

nothing calls this directly

Calls 5

plot_cuboidFunction · 0.85
subplotsMethod · 0.45
set_titleMethod · 0.45
set_box_aspectMethod · 0.45
set_aspectMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…