def test_plot_3d(self):
"""Plot 3d test."""
# Test 3d plots.
self.assert_X_from_iterables(
self.assertIsInstance,
# TODO: error prone since colorbars can be added.
(fig.get_axes()[0] for fig in self.figures_3d),
itertools.repeat(Axes3D))
# Test that there is just one axes per figure.
for i, figure in enumerate(self.figures_3d):
axes = figure.get_axes()
if len(axes) != 1:
# TODO: colorbar may add a second axes.
pass
raise ValueError(
"Axes has the wrong number of elements: {0} but "
"should be 1.".format(len(axes)))
test_matplotlib_utilities.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录