| 97 | |
| 98 | @image_comparison(['contour_manual_labels'], remove_text=True, style='mpl20') |
| 99 | def test_contour_manual_labels(): |
| 100 | x, y = np.meshgrid(np.arange(0, 10), np.arange(0, 10)) |
| 101 | z = np.max(np.dstack([abs(x), abs(y)]), 2) |
| 102 | |
| 103 | plt.figure(figsize=(6, 2), dpi=200) |
| 104 | cs = plt.contour(x, y, z) |
| 105 | |
| 106 | pts = np.array([(1.0, 3.0), (1.0, 4.4), (1.0, 6.0)]) |
| 107 | plt.clabel(cs, manual=pts) |
| 108 | pts = np.array([(2.0, 3.0), (2.0, 4.4), (2.0, 6.0)]) |
| 109 | plt.clabel(cs, manual=pts, fontsize='small', colors=('r', 'g')) |
| 110 | |
| 111 | |
| 112 | def test_contour_manual_moveto(): |