()
| 232 | |
| 233 | @image_comparison(['contour_datetime_axis.png'], style='mpl20') |
| 234 | def test_contour_datetime_axis(): |
| 235 | fig = plt.figure() |
| 236 | fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15) |
| 237 | base = datetime.datetime(2013, 1, 1) |
| 238 | x = np.array([base + datetime.timedelta(days=d) for d in range(20)]) |
| 239 | y = np.arange(20) |
| 240 | z1, z2 = np.meshgrid(np.arange(20), np.arange(20)) |
| 241 | z = z1 * z2 |
| 242 | plt.subplot(221) |
| 243 | plt.contour(x, y, z) |
| 244 | plt.subplot(222) |
| 245 | plt.contourf(x, y, z) |
| 246 | x = np.repeat(x[np.newaxis], 20, axis=0) |
| 247 | y = np.repeat(y[:, np.newaxis], 20, axis=1) |
| 248 | plt.subplot(223) |
| 249 | plt.contour(x, y, z) |
| 250 | plt.subplot(224) |
| 251 | plt.contourf(x, y, z) |
| 252 | for ax in fig.get_axes(): |
| 253 | for label in ax.get_xticklabels(): |
| 254 | label.set_ha('right') |
| 255 | label.set_rotation(30) |
| 256 | |
| 257 | |
| 258 | @image_comparison(['contour_test_label_transforms.png'], |
nothing calls this directly
no test coverage detected
searching dependent graphs…