Skip to content

Commit 967fba3

Browse files
committed
Small tweaks to subplot tutorial
1 parent 3f0c008 commit 967fba3

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
tutorials/coastlines.rst
3434
tutorials/regions.rst
3535
tutorials/plot.rst
36-
tutorials/subplots.rst
3736
tutorials/lines.rst
3837
tutorials/text.rst
3938
tutorials/contour-map.rst
4039
tutorials/earth-relief.rst
4140
tutorials/3d-perspective-image.rst
4241
tutorials/inset.rst
42+
tutorials/subplots.rst
4343
tutorials/configuration.rst
4444

4545
.. toctree::

examples/tutorials/subplots.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
Subplots
3-
========
2+
Making subplot panels
3+
=====================
44
55
When you're preparing a figure for a paper, there will often be times when
66
you'll need to put many individual plots into one large figure, and label them
@@ -17,12 +17,14 @@
1717
use of :meth:`pygmt.Figure.subplot` which offers finer grained control, and
1818
this is what the tutorial below will cover.
1919
"""
20-
21-
###############################################################################
22-
# Let's start by importing the PyGMT library and initializing a Figure
20+
# sphinx_gallery_thumbnail_number = 3
2321

2422
import pygmt
2523

24+
###############################################################################
25+
#
26+
# Let's start by initializing a :class:`pygmt.Figure` instance.
27+
2628
fig = pygmt.Figure()
2729

2830
###############################################################################
@@ -222,10 +224,10 @@
222224
#
223225
# In subplot mode, the size of each subgraph is controlled by the
224226
# ``figsize`` option of :meth:`pygmt.Figure.subplot`. Users can override
225-
# this and use``projection`` to specify the size of an individual subplot,
227+
# this and use ``projection`` to specify the size of an individual subplot,
226228
# but this size will not be remembered. If the next command does not
227-
# specify``projection``, the default size of the subplot mode will be used,
228-
# and the resulting plot will be inccorect.
229+
# specify ``projection``, the default size of the subplot mode will be
230+
# used, and the resulting plot will be inccorect.
229231
#
230232
# The current workaround is to use the same ``projection`` option in all
231233
# commands for the subplot. For example, we forced subplot (a) to have a
@@ -236,4 +238,4 @@
236238
###############################################################################
237239
# Since we skipped the second subplot, the auto label function will name the
238240
# three subplots as a, c and d, which is not what we want, so we have to use
239-
# ``fig.sca(fixedlabel="(a)"`` to manually set the subplot label.
241+
# ``fig.sca(fixedlabel="(a)")`` to manually set the subplot label.

0 commit comments

Comments
 (0)