()
| 1095 | |
| 1096 | @image_comparison(['nonorm_colorbars.svg'], style='mpl20') |
| 1097 | def test_nonorm(): |
| 1098 | plt.rcParams['svg.fonttype'] = 'none' |
| 1099 | data = [1, 2, 3, 4, 5] |
| 1100 | |
| 1101 | fig, ax = plt.subplots(figsize=(6, 1)) |
| 1102 | fig.subplots_adjust(bottom=0.5) |
| 1103 | |
| 1104 | norm = NoNorm(vmin=min(data), vmax=max(data)) |
| 1105 | cmap = mpl.colormaps["viridis"].resampled(len(data)) |
| 1106 | mappable = cm.ScalarMappable(norm=norm, cmap=cmap) |
| 1107 | cbar = fig.colorbar(mappable, cax=ax, orientation="horizontal") |
| 1108 | |
| 1109 | |
| 1110 | @image_comparison(['test_boundaries.png'], remove_text=True, |
nothing calls this directly
no test coverage detected
searching dependent graphs…