From ebc807ec7caffa736841db7c17d82c80a603b16a Mon Sep 17 00:00:00 2001 From: Wei Ji Date: Sun, 14 Feb 2021 21:57:58 +1300 Subject: [PATCH] Replace argument with parameter as per #886 --- examples/tutorials/subplots.py | 14 +++++++------- pygmt/src/subplot.py | 4 ++-- pygmt/tests/test_subplot.py | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/tutorials/subplots.py b/examples/tutorials/subplots.py index 32c4394e770..4e1fbc1c967 100644 --- a/examples/tutorials/subplots.py +++ b/examples/tutorials/subplots.py @@ -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``. ############################################################################### @@ -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( @@ -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. @@ -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 @@ -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() diff --git a/pygmt/src/subplot.py b/pygmt/src/subplot.py index e608a714201..57d272b3432 100644 --- a/pygmt/src/subplot.py +++ b/pygmt/src/subplot.py @@ -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` @@ -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 diff --git a/pygmt/tests/test_subplot.py b/pygmt/tests/test_subplot.py index b03b8a4659f..44d78a6aa9d 100644 --- a/pygmt/tests/test_subplot.py +++ b/pygmt/tests/test_subplot.py @@ -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"): @@ -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()