()
| 369 | |
| 370 | |
| 371 | def test_colorbar_ticks(): |
| 372 | # test fix for #5673 |
| 373 | fig, ax = plt.subplots() |
| 374 | x = np.arange(-3.0, 4.001) |
| 375 | y = np.arange(-4.0, 3.001) |
| 376 | X, Y = np.meshgrid(x, y) |
| 377 | Z = X * Y |
| 378 | clevs = np.array([-12, -5, 0, 5, 12], dtype=float) |
| 379 | colors = ['r', 'g', 'b', 'c'] |
| 380 | cs = ax.contourf(X, Y, Z, clevs, colors=colors, extend='neither') |
| 381 | cbar = fig.colorbar(cs, ax=ax, orientation='horizontal', ticks=clevs) |
| 382 | assert len(cbar.ax.xaxis.get_ticklocs()) == len(clevs) |
| 383 | |
| 384 | |
| 385 | def test_colorbar_minorticks_on_off(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…