Skip to content

Commit 0ccac21

Browse files
Update tutorial
1 parent efc1e42 commit 0ccac21

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

examples/tutorials/advanced/subplots.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
nrows=2,
101101
ncols=2,
102102
figsize=("15c", "6c"),
103-
autolabel=True,
103+
auto_label=True,
104104
frame=["af", "WSne"],
105105
margins=["0.1c", "0.2c"],
106106
title="My Subplot Heading",
@@ -117,7 +117,7 @@
117117
# 15 cm wide and 6 cm high (``figsize=["15c", "6c"]``). In addition, we use
118118
# some optional parameters to fine-tune some details of the figure creation:
119119
#
120-
# - ``autolabel=True``: Each subplot is automatically labelled 'abcd'.
120+
# - ``auto_label=True``: Each subplot is automatically labelled 'abcd'.
121121
# - ``margins=["0.1c", "0.2c"]``: Adjusts the space between adjacent subplots.
122122
# In this case, it is set as 0.1 cm in the x-direction and 0.2 cm in the
123123
# y-direction.
@@ -168,7 +168,7 @@
168168
nrows=2,
169169
ncols=2,
170170
figsize=("15c", "6c"), # width of 15 cm, height of 6 cm
171-
autolabel=True,
171+
auto_label=True,
172172
margins=["0.3c", "0.2c"], # horizontal 0.3 cm and vertical 0.2 cm margins
173173
title="My Subplot Heading",
174174
sharex="b", # shared x-axis on the bottom side
@@ -204,7 +204,7 @@
204204

205205
fig = pygmt.Figure()
206206
# Bottom row, two subplots
207-
with fig.subplot(nrows=1, ncols=2, figsize=("15c", "3c"), autolabel="b)"):
207+
with fig.subplot(nrows=1, ncols=2, figsize=("15c", "3c"), auto_label="b)"):
208208
fig.basemap(
209209
region=[0, 5, 0, 5], projection="X?", frame=["af", "WSne"], panel=[0, 0]
210210
)
@@ -214,7 +214,7 @@
214214
# Move plot origin by 1 cm above the height of the entire figure
215215
fig.shift_origin(yshift="h+1c")
216216
# Top row, one subplot
217-
with fig.subplot(nrows=1, ncols=1, figsize=("15c", "3c"), autolabel="a)"):
217+
with fig.subplot(nrows=1, ncols=1, figsize=("15c", "3c"), auto_label="a)"):
218218
fig.basemap(
219219
region=[0, 10, 0, 10], projection="X?", frame=["af", "WSne"], panel=[0, 0]
220220
)
@@ -223,19 +223,19 @@
223223
fig.show()
224224

225225
# %%
226-
# We start by drawing the bottom two subplots, setting ``autolabel="b)"`` so
226+
# We start by drawing the bottom two subplots, setting ``auto_label="b)"`` so
227227
# that the subplots are labelled 'b)' and 'c)'. Next, we use
228228
# :meth:`pygmt.Figure.shift_origin` to move the plot origin 1 cm above the
229229
# **h**\ eight of the entire figure that is currently plotted (i.e. the bottom
230230
# row subplots). A single subplot is then plotted on the top row. You may need
231231
# to adjust the ``yshift`` parameter to make your plot look nice. This top row
232-
# uses ``autolabel="a)"``, and we also plotted some text inside. Note that
232+
# uses ``auto_label="a)"``, and we also plotted some text inside. Note that
233233
# ``projection="X?"`` was used to let GMT automatically determine the size of
234234
# the subplot according to the size of the subplot area.
235235

236236
# %%
237-
# You can also manually override the ``autolabel`` for each subplot using for
238-
# example, ``fig.set_panel(..., fixedlabel="b) Panel 2")`` which would allow
237+
# You can also manually override the ``auto_label`` for each subplot using for
238+
# example, ``fig.set_panel(..., fixed_label="b) Panel 2")`` which would allow
239239
# you to manually label a single subplot as you wish. This can be useful for
240240
# adding a more descriptive subtitle to individual subplots.
241241

0 commit comments

Comments
 (0)