(M, s=1, *args, **kwargs)
| 1216 | |
| 1217 | |
| 1218 | def _test_proj_draw_axes(M, s=1, *args, **kwargs): |
| 1219 | xs = [0, s, 0, 0] |
| 1220 | ys = [0, 0, s, 0] |
| 1221 | zs = [0, 0, 0, s] |
| 1222 | txs, tys, tzs = proj3d.proj_transform(xs, ys, zs, M) |
| 1223 | o, ax, ay, az = zip(txs, tys) |
| 1224 | lines = [(o, ax), (o, ay), (o, az)] |
| 1225 | |
| 1226 | fig, ax = plt.subplots(*args, **kwargs) |
| 1227 | linec = LineCollection(lines) |
| 1228 | ax.add_collection(linec, autolim="_datalim_only") |
| 1229 | for x, y, t in zip(txs, tys, ['o', 'x', 'y', 'z']): |
| 1230 | ax.text(x, y, t) |
| 1231 | |
| 1232 | return fig, ax |
| 1233 | |
| 1234 | |
| 1235 | @mpl3d_image_comparison(['proj3d_axes_cube.png'], style='mpl20') |
no test coverage detected
searching dependent graphs…