()
| 1234 | |
| 1235 | @mpl3d_image_comparison(['proj3d_axes_cube.png'], style='mpl20') |
| 1236 | def 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') |
nothing calls this directly
no test coverage detected
searching dependent graphs…