Skip to content

Commit 26e6c4e

Browse files
Feedback for Natalia: consolidating the Python code
1 parent 5676a5a commit 26e6c4e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/source/recipes/plot_16_recipe.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@
5252
# However, OSGB and EuroPP will require very different data anyway.
5353
for i, proj in enumerate(projtypes):
5454
cfp.gpos(i + 1)
55-
if projtypes[i] == "lcc":
55+
if proj == "lcc":
5656
cfp.mapset(proj="lcc", lonmin=-50, lonmax=50, latmin=20, latmax=85)
57-
if (projtypes[i] == "OSGB") or (projtypes[i] == "EuroPP"):
58-
cfp.mapset(proj=projtypes[i], resolution="50m")
57+
if proj in ("OSGB", "EuroPP"):
58+
cfp.mapset(proj=proj, resolution="50m")
5959
else:
60-
cfp.mapset(proj=projtypes[i])
60+
cfp.mapset(proj=proj)
6161
if i == len(projtypes) - 1:
6262
cfp.con(
6363
f.subspace(pressure=850),
6464
lines=False,
65-
title=projtypes[i],
65+
title=proj,
6666
colorbar_position=[0.1, 0.1, 0.8, 0.02],
6767
colorbar_orientation="horizontal",
6868
)
@@ -72,7 +72,7 @@
7272
cfp.con(
7373
f.subspace(pressure=850),
7474
lines=False,
75-
title=projtypes[i],
75+
title=proj,
7676
colorbar=False,
7777
)
7878
cfp.gclose()

0 commit comments

Comments
 (0)