()
| 20 | |
| 21 | @image_comparison(['legend_bar.png'], remove_text=True, style='mpl20') |
| 22 | def test_legend_bar(): |
| 23 | fig, ax = plt.subplots(subplot_kw=dict(projection='3d')) |
| 24 | x = np.arange(10) |
| 25 | b1 = ax.bar(x, x, zdir='y', align='edge', color='m') |
| 26 | b2 = ax.bar(x, x[::-1], zdir='x', align='edge', color='g') |
| 27 | ax.legend([b1[0], b2[0]], ['up', 'down']) |
| 28 | |
| 29 | |
| 30 | @image_comparison(['fancy.png'], remove_text=True, style='mpl20', |