Skip to content

Commit 0f8c93e

Browse files
Update recipe 16: gopen & gclose in same block for plot to emerge
1 parent 9e2d650 commit 0f8c93e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

docs/source/recipes/plot_16_recipe.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@
1919
f = cf.read("~/recipes/ggap.nc")[0]
2020

2121
# %%
22-
# 3. Create the file with subplots. If changing the number of subplots,
23-
# ensure the number of rows * number of columns = the number of projections.
24-
# Here we are doing 6 projections so 2 x 3 is fine:
25-
cfp.gopen(rows=2, columns=3, bottom=0.2, file="projections.png")
26-
27-
# %%
28-
# 4. List the projection types to use. Here we are using
22+
# 3. List the projection types to use. Here we are using
2923
# Cylindrical/Default, North Pole Stereographic, South Pole Stereographic,
3024
# Mollweide, Mercator and Robinson. However there are several other choices
3125
# possible, see:
@@ -34,7 +28,11 @@
3428
projtypes = ["cyl", "npstere", "spstere", "moll", "merc", "robin"]
3529

3630
# %%
37-
# 5. Loop through the list of projection types and plot each as a sub-plot:
31+
# 4. Create the file with subplots. If changing the number of subplots,
32+
# ensure the number of rows * number of columns = the number of projections.
33+
# Here we are doing 6 projections so 2 x 3 is fine. Then loop through the
34+
# list of projection types and plot each as a sub-plot.
35+
cfp.gopen(rows=2, columns=3, bottom=0.2, file="projections.png")
3836
for i, proj in enumerate(projtypes):
3937
# gpos has 1 added to the index because it takes 1 as its first value
4038
cfp.gpos(i + 1)

0 commit comments

Comments
 (0)