From 8734dbe4aef0a593753550fa314c8e33dd71d2f9 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sat, 6 Aug 2022 14:39:54 +0200 Subject: [PATCH 01/39] Replace 'function' by 'method' in 'subplots.py' --- examples/tutorials/advanced/subplots.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/tutorials/advanced/subplots.py b/examples/tutorials/advanced/subplots.py index 17e64bb0c86..16a20f872d2 100644 --- a/examples/tutorials/advanced/subplots.py +++ b/examples/tutorials/advanced/subplots.py @@ -31,7 +31,7 @@ # Define subplot layout # --------------------- # -# The :meth:`pygmt.Figure.subplot` function is used to set up the layout, size, +# The :meth:`pygmt.Figure.subplot` method is used to set up the layout, size, # and other attributes of the figure. It divides the whole canvas into regular # grid areas with *n* rows and *m* columns. Each grid area can contain an # individual subplot. For example: @@ -62,8 +62,8 @@ fig.show() ############################################################################### -# The :meth:`pygmt.Figure.set_panel` function activates a specified subplot, -# and all subsequent plotting functions will take place in that subplot panel. +# The :meth:`pygmt.Figure.set_panel` method activates a specified subplot, +# and all subsequent plotting methods 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`` parameter. Pass in either the *index* number, or a tuple/list like @@ -145,7 +145,7 @@ ############################################################################### # .. note:: # -# All plotting functions (e.g. :meth:`pygmt.Figure.coast`, +# All plotting methods (e.g. :meth:`pygmt.Figure.coast`, # :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 From ef169ec9e33c5b37d35e790783526f336734ed54 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Wed, 10 Aug 2022 23:08:53 +0200 Subject: [PATCH 02/39] Replace 'function' by 'class' in 'figure.py' ('psconvert') --- pygmt/figure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/figure.py b/pygmt/figure.py index 3a31fecf4ed..9931a6b89a9 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -145,7 +145,7 @@ def psconvert(self, icc_gray=False, **kwargs): PDF, PNG, PPM, SVG, TIFF) using GhostScript. If no input files are given, will convert the current active figure - (see :func:`pygmt.figure`). In this case, an output name must be given + (see :class:`pygmt.figure`). In this case, an output name must be given using parameter *prefix*. Full option list at :gmt-docs:`psconvert.html` From b313a67ccea9e2fbaf3c33a705a3b44c4c0fa46a Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Thu, 11 Aug 2022 16:43:30 +0200 Subject: [PATCH 03/39] Replace 'module' by 'function' in 'api/index.rst' --- doc/api/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/index.rst b/doc/api/index.rst index 02586509f04..2b1d2b94be4 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -84,7 +84,7 @@ Saving and displaying the figure Configuring the display settings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The following module is provided directly through the :mod:`pygmt` top level +The following function is provided directly through the :mod:`pygmt` top level package. .. autosummary:: @@ -95,7 +95,7 @@ package. Color palette table generation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The following modules are provided directly through the :mod:`pygmt` top level +The following functions are provided directly through the :mod:`pygmt` top level package. .. autosummary:: From 0b13099f44a4d800c7e0c88483633266ca4f6d96 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Thu, 11 Aug 2022 21:18:58 +0200 Subject: [PATCH 04/39] Replace 'method' by 'function' in 'colorbars_multiple.py' --- examples/gallery/embellishments/colorbars_multiple.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gallery/embellishments/colorbars_multiple.py b/examples/gallery/embellishments/colorbars_multiple.py index 1781816209a..412d9a88863 100644 --- a/examples/gallery/embellishments/colorbars_multiple.py +++ b/examples/gallery/embellishments/colorbars_multiple.py @@ -23,7 +23,7 @@ nrows=1, ncols=2, figsize=("15c", "8c"), autolabel=True, margins="0.5c" ): # Activate the first panel so that the colormap created by the makecpt - # method is a panel-level CPT + # function is a panel-level CPT with fig.set_panel(panel=0): pygmt.makecpt(cmap="geo", series=[-8000, 8000]) # "R?" means Winkel Tripel projection with map width automatically @@ -31,7 +31,7 @@ fig.grdimage(grid=grid_globe, projection="R?", region="g", frame="a") fig.colorbar(frame=["a4000f2000", "x+lElevation", "y+lm"]) # Activate the second panel so that the colormap created by the makecpt - # method is a panel-level CPT + # function is a panel-level CPT with fig.set_panel(panel=1): pygmt.makecpt(cmap="globe", series=[-6000, 3000]) # "M?" means Mercator projection with map width also automatically From 80339ebd1be9869fd186e8266210c7c31ea82644 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Thu, 11 Aug 2022 22:13:54 +0200 Subject: [PATCH 05/39] Replace 'method' by 'function' in 'points_categorical.py' --- examples/gallery/symbols/points_categorical.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gallery/symbols/points_categorical.py b/examples/gallery/symbols/points_categorical.py index 43331ef3f28..d71ed5f3d8d 100644 --- a/examples/gallery/symbols/points_categorical.py +++ b/examples/gallery/symbols/points_categorical.py @@ -7,8 +7,8 @@ can be visualized. Here, we can pass the individual categories included in the "species" column directly to the ``color`` parameter via ``color=df.species.cat.codes.astype(int)``. Additionally, we have to set -``cmap=True``. A desired colormap can be selected via the :meth:`pygmt.makecpt` -method. +``cmap=True``. A desired colormap can be selected via the :func:`pygmt.makecpt` +function. """ import pandas as pd From 1c6205456fdf7cc8c85a50c493af0de2154750ed Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Fri, 19 Aug 2022 21:17:59 +0200 Subject: [PATCH 06/39] Replace 'function' by 'method' in 'regions.py' --- examples/tutorials/basics/regions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tutorials/basics/regions.py b/examples/tutorials/basics/regions.py index 39899485d63..97da6ce9c6f 100644 --- a/examples/tutorials/basics/regions.py +++ b/examples/tutorials/basics/regions.py @@ -2,7 +2,7 @@ Setting the region ================== -Many of the plotting functions take the ``region`` parameter, which sets the +Many of the plotting methods take the ``region`` parameter, which sets the area that will be shown in the figure. This tutorial covers the different types of inputs that it can accept. """ From b8c851fc8f0aa917ea7b5893492c3546ad4d4046 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Fri, 19 Aug 2022 21:24:16 +0200 Subject: [PATCH 07/39] Replace 'function' by 'method' in 'insets.py' --- examples/tutorials/advanced/insets.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/tutorials/advanced/insets.py b/examples/tutorials/advanced/insets.py index 974805d0250..42bbbb97f5f 100644 --- a/examples/tutorials/advanced/insets.py +++ b/examples/tutorials/advanced/insets.py @@ -51,7 +51,7 @@ frame="a", ) with fig.inset(position="jBL+w3c", box="+pblack+glightred"): - # pass is used to exit the with statement as no plotting functions are + # pass is used to exit the with statement as no plotting methods are # called pass fig.show() @@ -81,7 +81,7 @@ ############################################################################### # -# Standard plotting functions can be called from within the ``inset`` context +# Standard plotting methods can be called from within the ``inset`` context # manager. The example below uses :meth:`pygmt.Figure.coast` to plot a zoomed # out map that selectively paints the state of Massachusetts to shows its # location relative to other states. @@ -105,7 +105,7 @@ region=[-80, -65, 35, 50], projection="M3c", ): - # Use a plotting function to create a figure inside the inset. + # Use a plotting method to create a figure inside the inset. fig.coast( land="gray", borders=[1, 2], From 0f1adbcc5aef4478409707e74c8607d8b7391cbc Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Fri, 19 Aug 2022 21:32:04 +0200 Subject: [PATCH 08/39] Replace 'function' by 'method' in 'gird_equalization.py' --- examples/tutorials/advanced/grid_equalization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tutorials/advanced/grid_equalization.py b/examples/tutorials/advanced/grid_equalization.py index 62eab111d81..e63223a932c 100644 --- a/examples/tutorials/advanced/grid_equalization.py +++ b/examples/tutorials/advanced/grid_equalization.py @@ -1,7 +1,7 @@ """ Performing grid histogram equalization ====================================== -The :meth:`pygmt.grdhisteq.equalize_grid` function creates a grid using +The :meth:`pygmt.grdhisteq.equalize_grid` method creates a grid using statistics based on a cumulative distribution function. """ # sphinx_gallery_thumbnail_number = 3 From f69b10521be33045242d0da76b0e8fd67b0c30ef Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Fri, 19 Aug 2022 21:42:21 +0200 Subject: [PATCH 09/39] Replace 'function' by 'method' in 'inset.py' (embellishments) --- examples/gallery/embellishments/inset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/embellishments/inset.py b/examples/gallery/embellishments/inset.py index fb62139cb12..45258c08c0e 100644 --- a/examples/gallery/embellishments/inset.py +++ b/examples/gallery/embellishments/inset.py @@ -3,7 +3,7 @@ ----- The :meth:`pygmt.Figure.inset` method adds an inset figure inside a larger -figure. The function is called using a ``with`` statement, and its +figure. The method is called using a ``with`` statement, and its ``position``, ``box``, ``offset``, and ``margin`` parameters are set. Plotting methods called within the ``with`` statement are applied to the inset figure. """ From 9bdf46ecd6c23fbcb6f331d358df33ec6d008e5b Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Fri, 19 Aug 2022 21:46:25 +0200 Subject: [PATCH 10/39] Replace 'function' by 'method' in 'inset_rectangle_region.py' --- examples/gallery/embellishments/inset_rectangle_region.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/embellishments/inset_rectangle_region.py b/examples/gallery/embellishments/inset_rectangle_region.py index 07ba3cca7f0..3786e04ee98 100644 --- a/examples/gallery/embellishments/inset_rectangle_region.py +++ b/examples/gallery/embellishments/inset_rectangle_region.py @@ -3,7 +3,7 @@ -------------------------------------- The :meth:`pygmt.Figure.inset` method adds an inset figure inside a larger -figure. The function is called using a ``with`` statement, and its +figure. The method is called using a ``with`` statement, and its ``position``, ``box``, ``offset``, and ``margin`` can be customized. Plotting methods called within the ``with`` statement plot into the inset figure. """ From 24fb9e0ed65af9b6e5fd19abcaa8493e593df4d0 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Fri, 19 Aug 2022 21:55:11 +0200 Subject: [PATCH 11/39] Replace 'method' by 'function' in 'great_circles.py' --- examples/gallery/lines/great_circles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/lines/great_circles.py b/examples/gallery/lines/great_circles.py index 986337da5b3..c2fe84bc161 100644 --- a/examples/gallery/lines/great_circles.py +++ b/examples/gallery/lines/great_circles.py @@ -2,7 +2,7 @@ Generate points along great circles ----------------------------------- -The :meth:`pygmt.project` method can generate points along a great circle +The :func:`pygmt.project` function can generate points along a great circle whose center and end points can be defined via the ``center`` and ``endpoint`` parameters, respectively. Using the ``generate`` parameter allows to generate (*r*, *s*, *p*) points every *dist* units of *p* along a profile as From d10f29247ad4098fb58eaff3fc9b36e0cccad048 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Fri, 19 Aug 2022 21:58:38 +0200 Subject: [PATCH 12/39] Replace 'method' by 'function' in 'grdlandmask.py' --- examples/gallery/images/grdlandmask.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/images/grdlandmask.py b/examples/gallery/images/grdlandmask.py index 6fe26250aa3..2633f97255b 100644 --- a/examples/gallery/images/grdlandmask.py +++ b/examples/gallery/images/grdlandmask.py @@ -1,7 +1,7 @@ """ Create 'wet-dry' mask grid -------------------------- -The :meth:`pygmt.grdlandmask` method allows setting +The :func:`pygmt.grdlandmask` function allows setting all nodes on land or water to a specified value using the ``maskvalues`` parameter. """ From a83038afcc7d7bf640aca64c79d6cf50bdb95d39 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Fri, 19 Aug 2022 22:01:20 +0200 Subject: [PATCH 13/39] Replace 'method' by 'function' in 'blockm.py' --- examples/gallery/histograms/blockm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/histograms/blockm.py b/examples/gallery/histograms/blockm.py index 12c525f0b2f..57cba5a70b3 100644 --- a/examples/gallery/histograms/blockm.py +++ b/examples/gallery/histograms/blockm.py @@ -1,7 +1,7 @@ """ Blockmean --------- -The :meth:`pygmt.blockmean` method calculates different quantities +The :func:`pygmt.blockmean` function calculates different quantities inside blocks/bins whose dimensions are defined via the ``spacing`` parameter. The following examples show how to calculate the averages of the given values inside each bin and how to report the number of points inside each bin. From e12619f0c58f8a8536e890f4306148594f7a9807 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Fri, 19 Aug 2022 22:04:34 +0200 Subject: [PATCH 14/39] Replace 'method' by 'function' in 'grdgradient.py' --- examples/gallery/images/grdgradient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gallery/images/grdgradient.py b/examples/gallery/images/grdgradient.py index f97a58bc4d5..77c86966695 100644 --- a/examples/gallery/images/grdgradient.py +++ b/examples/gallery/images/grdgradient.py @@ -1,9 +1,9 @@ """ Calculating grid gradient and radiance -------------------------------------- -The :meth:`pygmt.grdgradient` method calculates the gradient of a grid file. +The :func:`pygmt.grdgradient` function calculates the gradient of a grid file. In the example shown below we will see how to calculate a hillshade map based -on a Data Elevation Model (DEM). As input :meth:`pygmt.grdgradient` gets +on a Data Elevation Model (DEM). As input :func:`pygmt.grdgradient` gets a :class:`xarray.DataArray` object or a path string to a grid file, calculates the respective gradient and returns it as an :class:`xarray.DataArray` object. We will use the ``radiance`` parameter in order to set the illumination source From 6139c8fdb16bce5dd8ca0ba855ed6e80318b44ff Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Fri, 19 Aug 2022 22:08:59 +0200 Subject: [PATCH 15/39] Replace 'method' by 'function' in 'grdclip.py' --- examples/gallery/images/grdclip.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/gallery/images/grdclip.py b/examples/gallery/images/grdclip.py index 6c57d6df6f1..b4cc2b1c58e 100644 --- a/examples/gallery/images/grdclip.py +++ b/examples/gallery/images/grdclip.py @@ -1,10 +1,10 @@ """ Clipping grid values -------------------- -The :meth:`pygmt.grdclip` method allows to clip defined ranges of grid values. -In the example shown below we set all elevation values (grid points) smaller -than 0 m (in general the bathymetric part of the grid) to a common value of --2000 m via the ``below`` parameter. +The :func:`pygmt.grdclip` function allows to clip defined ranges of grid +values. In the example shown below we set all elevation values (grid points) +smaller than 0 m (in general the bathymetric part of the grid) to a common +value of -2000 m via the ``below`` parameter. """ import pygmt From 876324ab0e0bedcf8b4f1f06effb419c75914957 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Fri, 19 Aug 2022 22:18:45 +0200 Subject: [PATCH 16/39] Replace 'method' by 'function' in 'earth_relief.py' --- examples/tutorials/advanced/earth_relief.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tutorials/advanced/earth_relief.py b/examples/tutorials/advanced/earth_relief.py index 10d2ef72ead..0da02502323 100644 --- a/examples/tutorials/advanced/earth_relief.py +++ b/examples/tutorials/advanced/earth_relief.py @@ -3,8 +3,8 @@ ===================== Plotting a map of Earth relief can use the data accessed by the -:meth:`pygmt.datasets.load_earth_relief` method. The data can then be plotted -using the :meth:`pygmt.Figure.grdimage` method. +:func:`pygmt.datasets.load_earth_relief` function. The data can then be +plotted using the :meth:`pygmt.Figure.grdimage` method. """ # sphinx_gallery_thumbnail_number = 5 From 03e81519a303a0e1ff5d0cc2b1e760404b4ec8a5 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 03:33:15 +0200 Subject: [PATCH 17/39] Replace 'meth' by 'class' in 'configuration.py' --- examples/tutorials/advanced/configuration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tutorials/advanced/configuration.py b/examples/tutorials/advanced/configuration.py index 077e41505a5..ec082c148f3 100644 --- a/examples/tutorials/advanced/configuration.py +++ b/examples/tutorials/advanced/configuration.py @@ -14,10 +14,10 @@ # ---------------------------------- # # Users can override default parameters either temporarily (locally) or -# permanently (globally) using :meth:`pygmt.config`. The full list of default +# permanently (globally) using :class:`pygmt.config`. The full list of default # parameters that can be changed can be found at :gmt-docs:`gmt.conf.html`. # -# We demonstrate the usage of :meth:`pygmt.config` by configuring a map plot. +# We demonstrate the usage of :class:`pygmt.config` by configuring a map plot. # Start with a basic figure with the default style fig = pygmt.Figure() From 1a782f2223f7d35d66266a1c8ea3d11d76f38d4d Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 03:36:41 +0200 Subject: [PATCH 18/39] Replace 'meth' by 'func' in 'date_time_charts.py' --- examples/tutorials/advanced/date_time_charts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tutorials/advanced/date_time_charts.py b/examples/tutorials/advanced/date_time_charts.py index 311f707fbfd..ab3011a1a94 100644 --- a/examples/tutorials/advanced/date_time_charts.py +++ b/examples/tutorials/advanced/date_time_charts.py @@ -237,7 +237,7 @@ # # Another way of creating charts involving datetime data can be done # by automatically generating the region of the plot. This can be done -# by passing the dataframe to :meth:`pygmt.info`, which will find +# by passing the dataframe to :func:`pygmt.info`, which will find # maximum and minimum values for each column and create a list # that could be passed as region. Additionally, the ``spacing`` argument # can be passed to increase the range past the maximum and minimum From f6698f1038071ea4a005c5a67604379533e06ef1 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 03:41:07 +0200 Subject: [PATCH 19/39] Replace 'meth' by 'func' in 'earth_relief.py' --- examples/tutorials/advanced/earth_relief.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tutorials/advanced/earth_relief.py b/examples/tutorials/advanced/earth_relief.py index 386b1082e6e..091707c8f75 100644 --- a/examples/tutorials/advanced/earth_relief.py +++ b/examples/tutorials/advanced/earth_relief.py @@ -86,7 +86,7 @@ # ------------------- # # In addition to providing global data, the ``region`` parameter for -# :meth:`pygmt.datasets.load_earth_relief` can be used to provide data for a +# :func:`pygmt.datasets.load_earth_relief` can be used to provide data for a # specific area. The ``region`` parameter is required for resolutions at 5 arc # minutes or higher, and accepts a list (as in the example below) or a string. # The geographic ranges are passed as *xmin*/*xmax*/*ymin*/*ymax*. From f1ffb5d13e8823c9169fccab28f7d2e326e69de4 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 03:44:20 +0200 Subject: [PATCH 20/39] Replace 'meth' by 'func' in 'grid_equalization.py' --- examples/tutorials/advanced/grid_equalization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tutorials/advanced/grid_equalization.py b/examples/tutorials/advanced/grid_equalization.py index e63223a932c..644d30c3720 100644 --- a/examples/tutorials/advanced/grid_equalization.py +++ b/examples/tutorials/advanced/grid_equalization.py @@ -12,7 +12,7 @@ # Load sample data # ---------------- # Load the sample Earth relief data for a region around Yosemite valley -# and use :meth:`pygmt.grd2xyz` to create a :class:`pandas.Series` with the +# and use :func:`pygmt.grd2xyz` to create a :class:`pandas.Series` with the # z-values. grid = pygmt.datasets.load_earth_relief( From 3e9a801f82b0e990e2de208118bd0b3d378a76df Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 03:49:42 +0200 Subject: [PATCH 21/39] Replace 'meth' by 'class' in 'vectors.py' --- examples/tutorials/advanced/vectors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tutorials/advanced/vectors.py b/examples/tutorials/advanced/vectors.py index 18b68df64c4..cd4669edf8a 100644 --- a/examples/tutorials/advanced/vectors.py +++ b/examples/tutorials/advanced/vectors.py @@ -22,7 +22,7 @@ # The angle is measured in degrees and moves counter-clockwise from the # horizontal. # The length of the vector uses centimeters by default but -# could be changed using :meth:`pygmt.config` +# could be changed using :class:`pygmt.config` # (Check the next examples for unit changes). # # Notice that the ``v`` in the ``style`` parameter stands for From 1fea362d35d8d67d7a674a2186e113cab736c892 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 03:52:43 +0200 Subject: [PATCH 22/39] Replace 'func' by 'meth' in 'plot.py' --- examples/tutorials/basics/plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tutorials/basics/plot.py b/examples/tutorials/basics/plot.py index 163397623ba..b8ec0f5b3d8 100644 --- a/examples/tutorials/basics/plot.py +++ b/examples/tutorials/basics/plot.py @@ -74,7 +74,7 @@ # even use the new matplotlib colormap "viridis". Here, we first create a # continuous colormap ranging from the minimum depth to the maximum depth of # the earthquakes using :func:`pygmt.makecpt`, then set ``cmap=True`` in -# :func:`pygmt.Figure.plot` to use the colormap. At the end of the plot, we +# :meth:`pygmt.Figure.plot` to use the colormap. At the end of the plot, we # also plot a colorbar showing the colormap used in the plot. # From 3e2b595dbf7fa1f73b270f3acc389070d30e84d0 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 03:54:47 +0200 Subject: [PATCH 23/39] Replace 'meth' by 'func' in 'scatter3d.py' --- examples/gallery/3d_plots/scatter3d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/3d_plots/scatter3d.py b/examples/gallery/3d_plots/scatter3d.py index 69d0716ab0e..73a046aba35 100644 --- a/examples/gallery/3d_plots/scatter3d.py +++ b/examples/gallery/3d_plots/scatter3d.py @@ -8,7 +8,7 @@ can be visualized using a perspective 3D plot. The ``region`` parameter has to include the :math:`x`, :math:`y`, :math:`z` axis limits in the form of (xmin, xmax, ymin, ymax, zmin, zmax), which can be done automatically -using :meth:`pygmt.info`. To plot the z-axis frame, set ``frame`` as a +using :func:`pygmt.info`. To plot the z-axis frame, set ``frame`` as a minimum to something like ``frame=["WsNeZ", "zaf"]``. Use ``perspective`` to control the azimuth and elevation angle of the view, and ``zscale`` to adjust the vertical exaggeration factor. From 7f3a50fdfe6e6a0b8e0dba755c8543a3e8a60405 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 16:38:52 +0200 Subject: [PATCH 24/39] Replace 'function' by 'method' in 'inset.py' (pygmt/src) --- pygmt/src/inset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/src/inset.py b/pygmt/src/inset.py index 29c9e4046e2..b005d5ee5a7 100644 --- a/pygmt/src/inset.py +++ b/pygmt/src/inset.py @@ -25,8 +25,8 @@ def inset(self, **kwargs): r""" Create an inset figure to be placed within a larger figure. - This function sets the position, frame, and margins for a smaller figure - inside of the larger figure. Plotting functions that are called within the + This method sets the position, frame, and margins for a smaller figure + inside of the larger figure. Plotting methods that are called within the context manager are added to the inset figure. Full option list at :gmt-docs:`inset.html` From 426cbab32458f7e2cedfee91669a054de7d0ef6b Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 17:29:50 +0200 Subject: [PATCH 25/39] Replace 'function' by 'method' in 'subplot.py' --- pygmt/src/subplot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/subplot.py b/pygmt/src/subplot.py index b7fd7f7a4c4..e39e4e8115f 100644 --- a/pygmt/src/subplot.py +++ b/pygmt/src/subplot.py @@ -37,7 +37,7 @@ def subplot(self, nrows=1, ncols=1, **kwargs): r""" Create multi-panel subplot figures. - This function is used to split the current figure into a rectangular layout + This method 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 parameters are available to specify the systematic layout, labeling, From cef17c3eacb25c9cfb1584c550adb33cdbe4782c Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 17:39:09 +0200 Subject: [PATCH 26/39] Replace 'method' by 'function' in 'grd2cpt.py' --- pygmt/src/grd2cpt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/src/grd2cpt.py b/pygmt/src/grd2cpt.py index 16793fe4f05..3de38d34444 100644 --- a/pygmt/src/grd2cpt.py +++ b/pygmt/src/grd2cpt.py @@ -33,7 +33,7 @@ def grd2cpt(grid, **kwargs): r""" Make GMT color palette tables from a grid file. - This is a method that will help you make static color palette tables + This is a function that will help you make static color palette tables (CPTs). By default, the CPT will simply be saved to the current session, but you can use ``output`` to save it to a file. The CPT is based on an existing dynamic master CPT of your choice, and the mapping from data value @@ -61,7 +61,7 @@ def grd2cpt(grid, **kwargs): ``overrule_bg`` or ``no_bg``. The color model (RGB, HSV or CMYK) of the palette created by - :meth:`pygmt.grd2cpt` will be the same as specified in the header of the + :func:`pygmt.grd2cpt` will be the same as specified in the header of the master CPT. When there is no :gmt-term:`COLOR_MODEL` entry in the master CPT, the :gmt-term:`COLOR_MODEL` specified in the :gmt-docs:`gmt.conf ` file or the ``color_model`` option will be From b14d8acb8a8bff50fd3a356fbf4507f3f31c64e1 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 17:42:43 +0200 Subject: [PATCH 27/39] Replace 'meth' by 'class' in 'grdhisteq.py' --- pygmt/src/grdhisteq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/grdhisteq.py b/pygmt/src/grdhisteq.py index ebf9c9ed9b6..73a4b8e121a 100644 --- a/pygmt/src/grdhisteq.py +++ b/pygmt/src/grdhisteq.py @@ -23,7 +23,7 @@ class grdhisteq: # pylint: disable=invalid-name r""" Perform histogram equalization for a grid. - Two common use cases of :meth:`pygmt.grdhisteq` are to find data values + Two common use cases of :class:`pygmt.grdhisteq` are to find data values that divide a grid into patches of equal area (:meth:`pygmt.grdhisteq.compute_bins`) or to write a grid with statistics based on some kind of cumulative distribution function From 3ec33fb93b92af510b4578390781b9fcaf76cd45 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 17:48:39 +0200 Subject: [PATCH 28/39] Replace 'meth' by 'func' in 'grdhisteq.py' --- pygmt/src/grdhisteq.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pygmt/src/grdhisteq.py b/pygmt/src/grdhisteq.py index 73a4b8e121a..0e4d9cb0ef6 100644 --- a/pygmt/src/grdhisteq.py +++ b/pygmt/src/grdhisteq.py @@ -39,7 +39,7 @@ class grdhisteq: # pylint: disable=invalid-name provide a list of data values that divide the data range into divisions which have an equal area in the image [Default is 16 if ``divisions`` is not set]. The :class:`pandas.DataFrame` or ASCII file output can be used to - make a colormap with :meth:`pygmt.makecpt` and an image with + make a colormap with :func:`pygmt.makecpt` and an image with :meth:`pygmt.Figure.grdimage` that has all levels of gray occurring equally. @@ -106,7 +106,7 @@ def _grdhisteq(grid, output_type, **kwargs): See Also ------- - :meth:`pygmt.grd2cpt` + :func:`pygmt.grd2cpt` """ with Session() as lib: @@ -201,7 +201,7 @@ def equalize_grid( See Also ------- - :meth:`pygmt.grd2cpt` + :func:`pygmt.grd2cpt` Note ---- @@ -254,7 +254,7 @@ def compute_bins( can provide a list of data values that divide the data range into divisions which have an equal area in the image [Default is 16 if ``divisions`` is not set]. The :class:`pandas.DataFrame` or ASCII file - output can be used to make a colormap with :meth:`pygmt.makecpt` and an + output can be used to make a colormap with :func:`pygmt.makecpt` and an image with :meth:`pygmt.Figure.grdimage` that has all levels of gray occurring equally. @@ -314,7 +314,7 @@ def compute_bins( See Also ------- - :meth:`pygmt.grd2cpt` + :func:`pygmt.grd2cpt` Note ---- From 7b78e25b8b91a85e3950f537d5b4bd0484cf37e7 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 17:50:21 +0200 Subject: [PATCH 29/39] Replace 'meth' by 'func' in 'x2sys_init.py' --- pygmt/src/x2sys_init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/x2sys_init.py b/pygmt/src/x2sys_init.py index cab1d4a9020..8c461f097ff 100644 --- a/pygmt/src/x2sys_init.py +++ b/pygmt/src/x2sys_init.py @@ -29,7 +29,7 @@ def x2sys_init(tag, **kwargs): x2sys TAG. The TAG keeps track of settings such as file format, whether the data are geographic or not, and the binning resolution for track indices. - Before you can run :meth:`pygmt.x2sys_init` you must set the environmental + Before you can run :func:`pygmt.x2sys_init` you must set the environmental parameter X2SYS_HOME to a directory where you have write permission, which is where x2sys can keep track of your settings. From 5bb6be5f1ed47c3e022bb6ff9bc02a2bcb0bc10a Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 17:52:32 +0200 Subject: [PATCH 30/39] Replace 'meth' by 'func' in 'x2sys_cross.py' --- pygmt/src/x2sys_cross.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/x2sys_cross.py b/pygmt/src/x2sys_cross.py index 5950be733a1..cda853219a8 100644 --- a/pygmt/src/x2sys_cross.py +++ b/pygmt/src/x2sys_cross.py @@ -78,7 +78,7 @@ def x2sys_cross(tracks=None, outfile=None, **kwargs): ("internal cross-overs") tracks (Cartesian or geographic), and report the time, position, distance along track, heading and speed along each track segment, and the crossover error (COE) and mean values for all observables. - By default, :meth:`pygmt.x2sys_cross` will look for both external and + By default, :func:`pygmt.x2sys_cross` will look for both external and internal COEs. As an option, you may choose to project all data using one of the map projections prior to calculating the COE. From edff42f43c8810a4d7bc408ab1c60adc31e23359 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Aug 2022 17:57:52 +0200 Subject: [PATCH 31/39] Replace 'method' by 'function' in 'grdimage.py' --- pygmt/src/grdimage.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pygmt/src/grdimage.py b/pygmt/src/grdimage.py index 8447f133e36..045fbf34fe8 100644 --- a/pygmt/src/grdimage.py +++ b/pygmt/src/grdimage.py @@ -49,7 +49,7 @@ def grdimage(self, grid, **kwargs): added by providing a file with intensities in the (-1,+1) range or instructions to derive intensities from the input data grid. Values outside this range will be clipped. Such intensity files can be created from the - grid using :meth:`pygmt.grdgradient` and, optionally, modified by + grid using :func:`pygmt.grdgradient` and, optionally, modified by ``grdmath`` or ``grdhisteq``. If GMT is built with GDAL support, ``grid`` can be an image file (geo-referenced or not). In this case the image can optionally be illuminated with the file provided via the ``shading`` @@ -131,15 +131,16 @@ def grdimage(self, grid, **kwargs): Give the name of a grid file or a DataArray with intensities in the (-1,+1) range, or a constant intensity to apply everywhere (affects the ambient light). Alternatively, derive an intensity grid from the input - data grid via a call to :meth:`pygmt.grdgradient`; append + data grid via a call to :func:`pygmt.grdgradient`; append **+a**\ *azimuth*, **+n**\ *args*, and **+m**\ *ambient* to specify - azimuth, intensity, and ambient arguments for that method, or just give - **+d** to select the default arguments (``+a-45+nt1+m0``). If you want - a more specific intensity scenario then run :meth:`pygmt.grdgradient` - separately first. If we should derive intensities from another file - than grid, specify the file with suitable modifiers [Default is no - illumination]. Note: If the input data is an *image* then an - *intensfile* or constant *intensity* must be provided. + azimuth, intensity, and ambient arguments for that function, or just + give **+d** to select the default arguments (``+a-45+nt1+m0``). If you + want a more specific intensity scenario then run + :func:`pygmt.grdgradient` separately first. If we should derive + intensities from another file than grid, specify the file with + suitable modifiers [Default is no illumination]. Note: If the input + data is an *image* then an *intensfile* or constant *intensity* must + be provided. {J} monochrome : bool Force conversion to monochrome image using the (television) YIQ From 3e91e11e60426f728865e219cf41bbfbc5fb1bc7 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Tue, 23 Aug 2022 15:31:15 +0200 Subject: [PATCH 32/39] Remove 'modules' in 'first_figure.py' --- examples/get-started/first_figure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/get-started/first_figure.py b/examples/get-started/first_figure.py index 910d918dd83..ef0a4fee048 100644 --- a/examples/get-started/first_figure.py +++ b/examples/get-started/first_figure.py @@ -40,7 +40,7 @@ # To add to a plot object (``fig`` in this example), the PyGMT module is used # as a method on the class. This example will use the # :meth:`pygmt.Figure.coast` method, which can be used to create a map without -# any other methods, modules or external data. The :meth:`pygmt.Figure.coast` +# any other methods or external data. The :meth:`pygmt.Figure.coast` # method plots the coastlines, borders, and bodies of water using a database # that is included in GMT. # From 3db83c838a242625662a3f98f92e6396608ec07c Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Tue, 23 Aug 2022 16:25:23 +0200 Subject: [PATCH 33/39] Improve formulation in 'first_figure.py' --- examples/get-started/first_figure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/get-started/first_figure.py b/examples/get-started/first_figure.py index ef0a4fee048..62229f509ed 100644 --- a/examples/get-started/first_figure.py +++ b/examples/get-started/first_figure.py @@ -37,8 +37,8 @@ fig = pygmt.Figure() ############################################################################### -# To add to a plot object (``fig`` in this example), the PyGMT module is used -# as a method on the class. This example will use the +# To add elements to the figure instance or object (``fig`` in this example) +# different methods can be called on it. This example will use the # :meth:`pygmt.Figure.coast` method, which can be used to create a map without # any other methods or external data. The :meth:`pygmt.Figure.coast` # method plots the coastlines, borders, and bodies of water using a database From 77ea1eae8dedc3d97b7d9d3c34dd9e3c92b54ea3 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Wed, 24 Aug 2022 22:02:41 +0200 Subject: [PATCH 34/39] Replace 'method' by 'function' in 'makecpt.py' --- pygmt/src/makecpt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/makecpt.py b/pygmt/src/makecpt.py index bbb167dc185..201a896f6c8 100644 --- a/pygmt/src/makecpt.py +++ b/pygmt/src/makecpt.py @@ -29,7 +29,7 @@ def makecpt(**kwargs): r""" Make GMT color palette tables. - This is a method that will help you make static color palette tables + This is a function that will help you make static color palette tables (CPTs). By default, the CPT will simply be saved to the current session, but you can use ``output`` to save it to a file. You define an equidistant set of contour intervals or pass your own z-table or list, and create a new From e7d1446edcbc00d73f540c912acaf536159990ea Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Thu, 25 Aug 2022 08:19:56 +0200 Subject: [PATCH 35/39] Replace 'function' by 'method' in 'contributing.md' --- doc/contributing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/contributing.md b/doc/contributing.md index d4322e64b48..3c8eaacbc23 100644 --- a/doc/contributing.md +++ b/doc/contributing.md @@ -392,7 +392,7 @@ Guidelines for a good tutorial: concise examples while the tutorials are detailed and full of text. * SI units should be used in the example code for tutorial plots. -Note that the `Figure.show()` function needs to be called for a plot to be inserted into +Note that the :meth:`pygmt.Figure.show` method needs to be called for a plot to be inserted into the documentation. ### Editing the API Documentation @@ -576,7 +576,7 @@ returning the `pygmt.Figure` object: ```python @pytest.mark.mpl_image_compare def test_my_plotting_case(): - "Test that my plotting function works" + "Test that my plotting method works" fig = Figure() fig.basemap(region=[0, 360, -90, 90], projection='W7i', frame=True) return fig @@ -682,7 +682,7 @@ Here's an example: ```python @check_figures_equal() def test_my_plotting_case(): - "Test that my plotting function works" + "Test that my plotting method works" fig_ref, fig_test = Figure(), Figure() fig_ref.grdimage("@earth_relief_01d_g", projection="W120/15c", cmap="geo") fig_test.grdimage(grid, projection="W120/15c", cmap="geo") From 0855dfe27ac6d334b77841a58b2cb71032470e4a Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Thu, 25 Aug 2022 12:48:14 +0200 Subject: [PATCH 36/39] Replace 'method' by 'function' in 'grdview.py' --- pygmt/src/grdview.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pygmt/src/grdview.py b/pygmt/src/grdview.py index 43ad4a2af49..1198efc4aa9 100644 --- a/pygmt/src/grdview.py +++ b/pygmt/src/grdview.py @@ -108,10 +108,10 @@ def grdview(self, grid, **kwargs): Provide the name of a grid file with intensities in the (-1,+1) range, or a constant intensity to apply everywhere (affects the ambient light). Alternatively, derive an intensity grid from the - input data grid reliefgrid via a call to ``grdgradient``; append - **+a**\ *azimuth*, **+n**\ *args*, and **+m**\ *ambient* to specify - azimuth, intensity, and ambient arguments for that method, or just give - **+d** to select the default arguments + input data grid reliefgrid via a call to :func:`pygmt.grdgradient`; + append **+a**\ *azimuth*, **+n**\ *args*, and **+m**\ *ambient* to + specify azimuth, intensity, and ambient arguments for that function, + or just give **+d** to select the default arguments [Default is **+a**\ -45\ **+nt**\ 1\ **+m**\ 0]. {V} {XY} From ab844dbc81cfc844fd2fa6dd750b76034b1f0d2a Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Fri, 26 Aug 2022 15:39:27 +0200 Subject: [PATCH 37/39] Remove reStructuredText syntax in 'contributing.md' (own) --- doc/contributing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/contributing.md b/doc/contributing.md index 3c8eaacbc23..d126e6fef25 100644 --- a/doc/contributing.md +++ b/doc/contributing.md @@ -392,7 +392,7 @@ Guidelines for a good tutorial: concise examples while the tutorials are detailed and full of text. * SI units should be used in the example code for tutorial plots. -Note that the :meth:`pygmt.Figure.show` method needs to be called for a plot to be inserted into +Note that the `Figure.show()` method needs to be called for a plot to be inserted into the documentation. ### Editing the API Documentation From 8613bbde556639135b5a19ddfd720dd41fd0adea Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sat, 27 Aug 2022 11:26:25 +0200 Subject: [PATCH 38/39] Replace 'meth' by 'func' in 'grdinfo.py' --- pygmt/src/grdinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/grdinfo.py b/pygmt/src/grdinfo.py index 01cda7b74c0..120e4c2df7e 100644 --- a/pygmt/src/grdinfo.py +++ b/pygmt/src/grdinfo.py @@ -101,7 +101,7 @@ def grdinfo(grid, **kwargs): the min and max. To force a symmetrical range about zero, using minus/plus the max absolute value of the two extremes, append **+s**\ . We report the result via the text string *zmin/zmax* or *zmin/zmax/dz* - (if *dz* was given) as expected by :meth:`pygmt.makecpt`. + (if *dz* was given) as expected by :func:`pygmt.makecpt`. {V} {f} From ec12259adb695c2008d5910545be849624eac427 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sat, 27 Aug 2022 11:30:09 +0200 Subject: [PATCH 39/39] Replace 'meth' by 'func' in 'grdcut.py' --- pygmt/src/grdcut.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/grdcut.py b/pygmt/src/grdcut.py index dd8a581ee30..ce0927d14e5 100644 --- a/pygmt/src/grdcut.py +++ b/pygmt/src/grdcut.py @@ -34,7 +34,7 @@ def grdcut(grid, **kwargs): Produce a new ``outgrid`` file which is a subregion of ``grid``. The subregion is specified with ``region``; the specified range must not exceed the range of ``grid`` (but see ``extend``). If in doubt, run - :meth:`pygmt.grdinfo` to check range. Alternatively, define the subregion + :func:`pygmt.grdinfo` to check range. Alternatively, define the subregion indirectly via a range check on the node values or via distances from a given point. Finally, you can give ``projection`` for oblique projections to determine the corresponding rectangular ``region`` that will give a grid