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

Function plot_cuboid

lib/mpl_toolkits/mplot3d/tests/test_axes3d.py:31–37  ·  view source on GitHub ↗
(ax, scale)

Source from the content-addressed store, hash-verified

29
30
31def plot_cuboid(ax, scale):
32 # plot a rectangular cuboid with side lengths given by scale (x, y, z)
33 r = [0, 1]
34 pts = itertools.combinations(np.array(list(itertools.product(r, r, r))), 2)
35 for start, end in pts:
36 if np.sum(np.abs(start - end)) == r[1] - r[0]:
37 ax.plot3D(*zip(start*np.array(scale), end*np.array(scale)))
38
39
40@check_figures_equal()

Callers 2

test_aspectsFunction · 0.85
test_aspects_adjust_boxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…