MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_proj_axes_cube

Function test_proj_axes_cube

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

Source from the content-addressed store, hash-verified

1234
1235@mpl3d_image_comparison(['proj3d_axes_cube.png'], style='mpl20')
1236def test_proj_axes_cube():
1237 M = _test_proj_make_M()
1238
1239 ts = '0 1 2 3 0 4 5 6 7 4'.split()
1240 xs = np.array([0, 1, 1, 0, 0, 0, 1, 1, 0, 0]) * 300.0
1241 ys = np.array([0, 0, 1, 1, 0, 0, 0, 1, 1, 0]) * 300.0
1242 zs = np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1]) * 300.0
1243
1244 txs, tys, tzs = proj3d.proj_transform(xs, ys, zs, M)
1245
1246 fig, ax = _test_proj_draw_axes(M, s=400)
1247
1248 ax.scatter(txs, tys, c=tzs)
1249 ax.plot(txs, tys, c='r')
1250 for x, y, t in zip(txs, tys, ts):
1251 ax.text(x, y, t)
1252
1253 plt.rcParams['axes3d.automargin'] = True # Remove when image is regenerated
1254 ax.set_xlim(-0.2, 0.2)
1255 ax.set_ylim(-0.2, 0.2)
1256
1257
1258@mpl3d_image_comparison(['proj3d_axes_cube_ortho.png'], style='mpl20')

Callers

nothing calls this directly

Calls 7

_test_proj_make_MFunction · 0.85
_test_proj_draw_axesFunction · 0.85
scatterMethod · 0.45
plotMethod · 0.45
textMethod · 0.45
set_xlimMethod · 0.45
set_ylimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…