()
| 1743 | @image_comparison(['stem3d.png'], style='mpl20', |
| 1744 | tol=0 if platform.machine() == 'x86_64' else 0.008) |
| 1745 | def test_stem3d(): |
| 1746 | fig, axs = plt.subplots(2, 3, figsize=(8, 6), |
| 1747 | constrained_layout=True, |
| 1748 | subplot_kw={'projection': '3d'}) |
| 1749 | |
| 1750 | theta = np.linspace(0, 2*np.pi) |
| 1751 | x = np.cos(theta - np.pi/2) |
| 1752 | y = np.sin(theta - np.pi/2) |
| 1753 | z = theta |
| 1754 | |
| 1755 | for ax, zdir in zip(axs[0], ['x', 'y', 'z']): |
| 1756 | ax.stem(x, y, z, orientation=zdir) |
| 1757 | ax.set_title(f'orientation={zdir}') |
| 1758 | |
| 1759 | x = np.linspace(-np.pi/2, np.pi/2, 20) |
| 1760 | y = np.ones_like(x) |
| 1761 | z = np.cos(x) |
| 1762 | |
| 1763 | for ax, zdir in zip(axs[1], ['x', 'y', 'z']): |
| 1764 | markerline, stemlines, baseline = ax.stem( |
| 1765 | x, y, z, |
| 1766 | linefmt='C4-.', markerfmt='C1D', basefmt='C2', |
| 1767 | orientation=zdir) |
| 1768 | ax.set_title(f'orientation={zdir}') |
| 1769 | markerline.set(markerfacecolor='none', markeredgewidth=2) |
| 1770 | baseline.set_linewidth(3) |
| 1771 | |
| 1772 | |
| 1773 | @image_comparison(["equal_box_aspect.png"], style="mpl20") |
nothing calls this directly
no test coverage detected
searching dependent graphs…