|
3 | 3 | Demo Axes Grid
|
4 | 4 | ==============
|
5 | 5 |
|
6 |
| -Grid of 2x2 images with a single colorbar or with one colorbar per axes. |
| 6 | +Grid of 2x2 images with a single colorbar or with one colorbar per Axes. |
7 | 7 | """
|
8 | 8 |
|
9 | 9 | import matplotlib.pyplot as plt
|
|
17 | 17 |
|
18 | 18 |
|
19 | 19 | # A grid of 2x2 images with 0.05 inch pad between images and only the
|
20 |
| -# lower-left axes is labeled. |
| 20 | +# lower-left Axes is labeled. |
21 | 21 | grid = ImageGrid(
|
22 | 22 | fig, 141, # similar to fig.add_subplot(141).
|
23 | 23 | nrows_ncols=(2, 2), axes_pad=0.05, label_mode="1")
|
24 | 24 | for ax in grid:
|
25 | 25 | ax.imshow(Z, extent=extent)
|
26 |
| -# This only affects axes in first column and second row as share_all=False. |
| 26 | +# This only affects Axes in first column and second row as share_all=False. |
27 | 27 | grid.axes_llc.set(xticks=[-2, 0, 2], yticks=[-2, 0, 2])
|
28 | 28 |
|
29 | 29 |
|
|
37 | 37 | grid.cbar_axes[0].colorbar(im)
|
38 | 38 | for cax in grid.cbar_axes:
|
39 | 39 | cax.tick_params(labeltop=False)
|
40 |
| -# This affects all axes as share_all = True. |
| 40 | +# This affects all Axes as share_all = True. |
41 | 41 | grid.axes_llc.set(xticks=[-2, 0, 2], yticks=[-2, 0, 2])
|
42 | 42 |
|
43 | 43 |
|
|
50 | 50 | im = ax.imshow(Z, extent=extent)
|
51 | 51 | cax.colorbar(im)
|
52 | 52 | cax.tick_params(labeltop=False)
|
53 |
| -# This affects all axes as share_all = True. |
| 53 | +# This affects all Axes as share_all = True. |
54 | 54 | grid.axes_llc.set(xticks=[-2, 0, 2], yticks=[-2, 0, 2])
|
55 | 55 |
|
56 | 56 |
|
|
65 | 65 | im = ax.imshow(Z, extent=extent, vmin=vlim[0], vmax=vlim[1])
|
66 | 66 | cb = cax.colorbar(im)
|
67 | 67 | cb.set_ticks((vlim[0], vlim[1]))
|
68 |
| -# This affects all axes as share_all = True. |
| 68 | +# This affects all Axes as share_all = True. |
69 | 69 | grid.axes_llc.set(xticks=[-2, 0, 2], yticks=[-2, 0, 2])
|
70 | 70 |
|
71 | 71 |
|
|
0 commit comments