|
18 | 18 |
|
19 | 19 | # %%
|
20 | 20 | # 2. Read the field in:
|
21 |
| -f = cf.read(f"~/recipes/ggap.nc")[0] |
| 21 | +f = cf.read("~/recipes/ggap.nc")[0] |
22 | 22 |
|
23 | 23 | # %%
|
24 | 24 | # 3. Choose a set of predefined colour scales to view. These can be chosen
|
|
84 | 84 | cfp.gpos(i + 1)
|
85 | 85 | cfp.cscale(colour_scale)
|
86 | 86 |
|
87 |
| - # For the topmost plots, label the coumn with the colour scale category |
| 87 | + # For the topmost plots, label the column with the colour scale category |
88 | 88 | # using the 'title' argument, otherwise don't add a title.
|
89 |
| - if i < 3: |
90 |
| - # Ensure the order the titles are written in corresponds to the |
91 |
| - # order unzipped in step 4, so the columns match up correctly. |
92 |
| - if i == 0: |
93 |
| - set_title = "Perceptually uniform\ncolour maps" |
94 |
| - elif i == 1: |
95 |
| - set_title = ( |
96 |
| - "NCL colour maps enhanced to \nhelp with colour blindness" |
97 |
| - ) |
98 |
| - elif i == 2: |
99 |
| - set_title = "Orography/bathymetry\ncolour maps" |
100 |
| - |
101 |
| - cfp.con( |
102 |
| - f.subspace(pressure=850), |
103 |
| - title=set_title, |
104 |
| - lines=False, |
105 |
| - axes=False, |
106 |
| - colorbar_drawedges=False, |
107 |
| - colorbar_title=f"Shown in '{colour_scale}'", |
108 |
| - colorbar_fraction=0.04, |
109 |
| - colorbar_thick=0.02, |
110 |
| - colorbar_fontsize=11, |
| 89 | + # Ensure the order the titles are written in corresponds to the |
| 90 | + # order unzipped in step 4, so the columns match up correctly. |
| 91 | + if i == 0: |
| 92 | + set_title = "Perceptually uniform\ncolour maps" |
| 93 | + elif i == 1: |
| 94 | + set_title = ( |
| 95 | + "NCL colour maps enhanced to \nhelp with colour blindness" |
111 | 96 | )
|
| 97 | + elif i == 2: |
| 98 | + set_title = "Orography/bathymetry\ncolour maps" |
112 | 99 | else:
|
113 |
| - cfp.con( |
114 |
| - f.subspace(pressure=850), |
115 |
| - lines=False, |
116 |
| - axes=False, |
117 |
| - colorbar_drawedges=False, |
118 |
| - colorbar_title=f"Shown in '{colour_scale}'", |
119 |
| - colorbar_fraction=0.04, |
120 |
| - colorbar_thick=0.02, |
121 |
| - colorbar_fontsize=11, |
122 |
| - ) |
| 100 | + set_title = "" |
| 101 | + |
| 102 | + cfp.con( |
| 103 | + f.subspace(pressure=850), |
| 104 | + title=set_title, |
| 105 | + lines=False, |
| 106 | + axes=False, |
| 107 | + colorbar_drawedges=False, |
| 108 | + colorbar_title=f"Shown in '{colour_scale}'", |
| 109 | + colorbar_fraction=0.04, |
| 110 | + colorbar_thick=0.02, |
| 111 | + colorbar_fontsize=11, |
| 112 | + ) |
123 | 113 |
|
124 | 114 | cfp.gclose(view=True)
|
0 commit comments