()
| 11 | |
| 12 | @image_comparison(['legend_plot.png'], remove_text=True, style='mpl20') |
| 13 | def test_legend_plot(): |
| 14 | fig, ax = plt.subplots(subplot_kw=dict(projection='3d')) |
| 15 | x = np.arange(10) |
| 16 | ax.plot(x, 5 - x, 'o', zdir='y', label='z=1') |
| 17 | ax.plot(x, x - 5, 'o', zdir='y', label='z=-1') |
| 18 | ax.legend() |
| 19 | |
| 20 | |
| 21 | @image_comparison(['legend_bar.png'], remove_text=True, style='mpl20') |