Skip to content

Commit

Permalink
Replace argument with parameter as per #886
Browse files Browse the repository at this point in the history
  • Loading branch information
weiji14 committed Feb 14, 2021
1 parent e0900e9 commit ebc807e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions examples/tutorials/subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
# all subsequent plotting functions will take place in that subplot panel. This
# is similar to matplotlib's ``plt.sca`` method. In order to specify a subplot,
# you will need to provide the identifier for that subplot via the ``panel``
# argument. Pass in either the *index* number, or a tuple/list like
# parameter. Pass in either the *index* number, or a tuple/list like
# (*row*, *col*) to ``panel``.

###############################################################################
Expand All @@ -91,7 +91,7 @@
# Making your first subplot
# -------------------------
# Next, let's use what we learned above to make a 2 row by 2 column subplot
# figure. We'll also pick up on some new arguments to configure our subplot.
# figure. We'll also pick up on some new parameters to configure our subplot.

fig = pygmt.Figure()
with fig.subplot(
Expand All @@ -111,9 +111,9 @@

###############################################################################
# In this example, we define a 2-row, 2-column (2x2) subplot layout using
# :meth:`pygmt.Figure.subplot`. The overall figure dimensions is set to be 15 cm
# wide and 6 cm high (``figsize=["15c", "6c"]``). In addition, we use some
# optional arguments to fine-tune some details of the figure creation:
# :meth:`pygmt.Figure.subplot`. The overall figure dimensions is set to be
# 15 cm wide and 6 cm high (``figsize=["15c", "6c"]``). In addition, we use
# some optional parameters to fine-tune some details of the figure creation:
#
# - ``autolabel=True``: Each subplot is automatically labelled abcd
# - ``margins=["0.1c", "0.2c"]``: adjusts the space between adjacent subplots.
Expand Down Expand Up @@ -146,7 +146,7 @@
# .. note::
#
# All plotting functions (e.g. :meth:`pygmt.Figure.coast`,
# :meth:`pygmt.Figure.text`, etc) are able to use ``panel`` argument when
# :meth:`pygmt.Figure.text`, etc) are able to use ``panel`` parameter when
# in subplot mode. Once a panel is activated using ``panel`` or
# :meth:`pygmt.Figure.set_panel`, subsequent plotting commands that don't
# set a ``panel`` will have their elements added to the same panel as
Expand All @@ -157,7 +157,7 @@
# --------------------------
# In the example above with the four subplots, the two subplots for each row
# have the same Y-axis range, and the two subplots for each column have the
# same X-axis range. You can use the ``sharex``/``sharey`` arguments to set a
# same X-axis range. You can use the ``sharex``/``sharey`` parameters to set a
# common X and/or Y axis between subplots.

fig = pygmt.Figure()
Expand Down
4 changes: 2 additions & 2 deletions pygmt/src/subplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def subplot(self, nrows=1, ncols=1, **kwargs):
This function is used to split the current figure into a rectangular layout
of subplots that each may contain a single self-contained figure. Begin by
defining the layout of the entire multi-panel illustration. Several
arguments are available to specify the systematic layout, labeling,
parameters are available to specify the systematic layout, labeling,
dimensions, and more for the subplots.
Full option list at :gmt-docs:`subplot.html#synopsis-begin-mode`
Expand Down Expand Up @@ -137,7 +137,7 @@ def subplot(self, nrows=1, ncols=1, **kwargs):
- Labels and titles that depends on which row or column are specified
as usual via a subplot's own ``frame`` setting.
- Append **+w** to the ``figsize`` or ``subsize`` argument to draw
- Append **+w** to the ``figsize`` or ``subsize`` parameter to draw
horizontal and vertical lines between interior panels using selected
pen [no lines].
title : str
Expand Down
4 changes: 2 additions & 2 deletions pygmt/tests/test_subplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_subplot_basic_frame():
@check_figures_equal()
def test_subplot_direct():
"""
Plot map elements to subplot directly using the panel argument.
Plot map elements to subplot directly using the panel parameter.
"""
fig_ref, fig_test = Figure(), Figure()
with fig_ref.subplot(nrows=2, ncols=1, Fs="3c/3c"):
Expand Down Expand Up @@ -91,7 +91,7 @@ def test_subplot_clearance_and_shared_xy_axis_layout():

def test_subplot_figsize_and_subsize_error():
"""
Check that an error is raised when both figsize and subsize arguments are
Check that an error is raised when both figsize and subsize parameters are
passed into subplot.
"""
fig = Figure()
Expand Down

0 comments on commit ebc807e

Please sign in to comment.