(ax, fontsize=12)
| 29 | |
| 30 | |
| 31 | def example_pcolor(ax, fontsize=12): |
| 32 | dx, dy = 0.6, 0.6 |
| 33 | y, x = np.mgrid[slice(-3, 3 + dy, dy), |
| 34 | slice(-3, 3 + dx, dx)] |
| 35 | z = (1 - x / 2. + x ** 5 + y ** 3) * np.exp(-x ** 2 - y ** 2) |
| 36 | pcm = ax.pcolormesh(x, y, z[:-1, :-1], cmap='RdBu_r', vmin=-1., vmax=1., |
| 37 | rasterized=True) |
| 38 | ax.set_xlabel('x-label', fontsize=fontsize) |
| 39 | ax.set_ylabel('y-label', fontsize=fontsize) |
| 40 | ax.set_title('Title', fontsize=fontsize) |
| 41 | return pcm |
| 42 | |
| 43 | |
| 44 | @image_comparison(['constrained_layout1.png'], style='mpl20') |
no test coverage detected
searching dependent graphs…