There was an error while loading. Please reload this page.
1 parent d4857ef commit 5702e7cCopy full SHA for 5702e7c
1 file changed
lib/mpl_toolkits/tests/test_mplot3d.py
@@ -1011,3 +1011,19 @@ def test_equal_box_aspect():
1011
ax.set_zlim3d(XYZlim)
1012
ax.axis('off')
1013
ax.set_box_aspect((1, 1, 1))
1014
+
1015
1016
+def test_colorbar_pos():
1017
+ num_plots = 2
1018
+ fig, axs = plt.subplots(1, num_plots, figsize=(4, 5),
1019
+ constrained_layout=True,
1020
+ subplot_kw={'projection':'3d'})
1021
+ for ax in axs:
1022
+ p_tri = ax.plot_trisurf(np.random.randn(5), np.random.randn(5),
1023
+ np.random.randn(5))
1024
1025
+ cbar = plt.colorbar(p_tri, ax=axs, orientation='horizontal')
1026
1027
+ fig.canvas.draw()
1028
+ # check that actually on the bottom
1029
+ assert cbar.ax.get_position().extents[1] < 0.2
0 commit comments