Skip to content

Commit d162dcb

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

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

docs/source/recipes/plot_16_recipe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# 4. Create the file with subplots. If changing the number of subplots,
3232
# ensure the number of rows * number of columns = the number of projections.
3333
# 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.
34+
# list of projection types and plot each as a sub-plot:
3535
cfp.gopen(rows=2, columns=3, bottom=0.2, file="projections.png")
3636
for i, proj in enumerate(projtypes):
3737
# gpos has 1 added to the index because it takes 1 as its first value

docs/source/recipes/plot_17_recipe.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@
6666

6767
# %%
6868
# 5. Create the figure and give it an overall title. Ensure the
69-
# number of rows * number of columns = number of colour scales:
69+
# number of rows * number of columns = number of colour scales.
70+
# Then we loop through all the different colour maps defined and plot
71+
# as subplots, with each category in the same column, labelling each column
72+
# with the colour scale category:
7073
cfp.gopen(rows=3, columns=3, bottom=0.1, top=0.85)
7174
plt.suptitle(
7275
(
@@ -75,11 +78,6 @@
7578
),
7679
fontsize=18,
7780
)
78-
79-
# %%
80-
# 6. We loop through all the different colour maps defined and plot
81-
# as subplots, with each category in the same column, labelling each column
82-
# with the colour scale category:
8381
for i, colour_scale in enumerate(colour_scales_columns):
8482
cfp.gpos(i + 1)
8583
cfp.cscale(colour_scale)

0 commit comments

Comments
 (0)