From 6b79637e8bc236ef07cb8a9c6dd56d0937b0a695 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 13 Feb 2021 14:17:03 +0000 Subject: [PATCH 01/23] Update doc strings for makecpt.py --- pygmt/src/makecpt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pygmt/src/makecpt.py b/pygmt/src/makecpt.py index bdad3f07952..3599fcd748e 100644 --- a/pygmt/src/makecpt.py +++ b/pygmt/src/makecpt.py @@ -81,7 +81,7 @@ def makecpt(**kwargs): ``background='i'`` to match the colors for the lowest and highest values in the input (instead of the output) CPT. color_model : - ``[R|r|h|c][+c[label]]``. + [**R**\|\ **r**\|\ **h**\|\ **c**\ ][**+c**\ [*label*\ ]]. Force output CPT to be written with r/g/b codes, gray-scale values or color name (**R**, default) or r/g/b codes only (**r**), or h-s-v codes (**h**), or c/m/y/k codes (**c**). Optionally or alternatively, append @@ -93,7 +93,7 @@ def makecpt(**kwargs): labels from *start* (a single letter or an integer). Append - to build ranges *start*-*start+1* instead. series : list or str - ``[min/max/inc[+b|l|n]|file|list]``. + [*min/max/inc*\ [**+b**\|\ **l**\|\ **n**\ ]\|\ *file*\|\ *list*\ ]. Defines the range of the new CPT by giving the lowest and highest z-value (and optionally an interval). If this is not given, the existing range in the master CPT will be used intact. The values @@ -102,7 +102,7 @@ def makecpt(**kwargs): For details on array creation, see :gmt-docs:`makecpt.html#generate-1d-array`. truncate : list or str - ``zlo/zhi``. + *zlo/zhi*\ . Truncate the incoming CPT so that the lowest and highest z-levels are to *zlo* and *zhi*. If one of these equal NaN then we leave that end of the CPT alone. The truncation takes place before any resampling. See From 90694410ea82dadf10c9346861debdf78117f2f1 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 13 Feb 2021 14:23:25 +0000 Subject: [PATCH 02/23] Update doc strings for savefig in figure.py --- pygmt/figure.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pygmt/figure.py b/pygmt/figure.py index 09ce222368c..d27a05e8d0b 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -178,7 +178,7 @@ def savefig( Save the figure to a file. This method implements a matplotlib-like interface for - :meth:`~gmt.Figure.psconvert`. + :doc:psconvert . Supported formats: PNG (``.png``), JPEG (``.jpg``), PDF (``.pdf``), BMP (``.bmp``), TIFF (``.tif``), EPS (``.eps``), and KML (``.kml``). @@ -199,9 +199,8 @@ def savefig( If True, will crop the figure canvas (page) to the plot area. anti_alias: bool If True, will use anti aliasing when creating raster images (PNG, - JPG, TIf). More specifically, uses options ``Qt=2, Qg=2`` in - :meth:`~gmt.Figure.psconvert`. Ignored if creating vector graphics. - Overrides values of ``Qt`` and ``Qg`` passed in through ``kwargs``. + JPG, TIFF). More specifically, it uses options ``t2, g2`` in + :doc:psconvert . Ignored if creating vector graphics. show: bool If True, will open the figure in an external viewer. dpi : int From b83b210a6cefea808e9741d664fa042abdd64d0c Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 13 Feb 2021 14:29:44 +0000 Subject: [PATCH 03/23] Update doc strings for psconvert in figure.py --- pygmt/figure.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pygmt/figure.py b/pygmt/figure.py index d27a05e8d0b..abfa289c769 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -149,9 +149,10 @@ def psconvert(self, **kwargs): icc_gray : bool Enforce gray-shades by using ICC profiles. anti_aliasing : str - Set the anti-aliasing options for graphics or text. Append the size - of the subsample box (1, 2, or 4) [4]. Default is no anti-aliasing - (same as bits = 1). + [**g**\|\ **p**\|\ **t**\][**1**\|\ **2**\|\ **4**]. + Set the anti-aliasing options for **g**\ raphics or **t**\ ext. + Append the size of the subsample box (1, 2, or 4) [4]. Default is + no anti-aliasing (same as bits = 1). fmt : str Sets the output format, where *b* means BMP, *e* means EPS, *E* means EPS with PageSize command, *f* means PDF, *F* means From e6125297adf437ccdc26cfe0a93c08e6103b19cd Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 13 Feb 2021 14:33:11 +0000 Subject: [PATCH 04/23] Update doc strings in blockmedian.py --- pygmt/src/blockmedian.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pygmt/src/blockmedian.py b/pygmt/src/blockmedian.py index fbed09c023e..4927e8f565e 100644 --- a/pygmt/src/blockmedian.py +++ b/pygmt/src/blockmedian.py @@ -39,11 +39,12 @@ def blockmedian(table, outfile=None, **kwargs): ASCII data table. spacing : str - ``'xinc[unit][+e|n][/yinc[unit][+e|n]]'``. + *xinc*\[\ *unit*\][**+e**\|\ **n**] + [/*yinc*\ [*unit*][**+e**\|\ **n**]]. x_inc [and optionally y_inc] is the grid spacing. region : str or list - ``'xmin/xmax/ymin/ymax[+r][+uunit]'``. + *xmin/xmax/ymin/ymax*\[\ **+r**\][**+u**\ *unit*]. Specify the region of interest. outfile : str From 8fc022323eca72b0669775a6cb4ea448e1eefedd Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 13 Feb 2021 14:34:02 +0000 Subject: [PATCH 05/23] Update doc strings in surface.py --- pygmt/src/surface.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pygmt/src/surface.py b/pygmt/src/surface.py index 21343a88652..42c79ca562a 100644 --- a/pygmt/src/surface.py +++ b/pygmt/src/surface.py @@ -47,11 +47,12 @@ def surface(x=None, y=None, z=None, data=None, **kwargs): Either a data file name or a 2d numpy array with the tabular data. spacing : str - ``'xinc[unit][+e|n][/yinc[unit][+e|n]]'``. + *xinc*\[\ *unit*\][**+e**\|\ **n**] + [/*yinc*\ [*unit*][**+e**\|\ **n**]]. x_inc [and optionally y_inc] is the grid spacing. region : str or list - ``'xmin/xmax/ymin/ymax[+r][+uunit]'``. + *xmin/xmax/ymin/ymax*\[\ **+r**\][**+u**\ *unit*]. Specify the region of interest. outfile : str From 3ae6d0d3d2caa8e35035849a091dbc87eaa0e637 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 13 Feb 2021 14:35:51 +0000 Subject: [PATCH 06/23] Update doc strings in grdcut.py --- pygmt/src/grdcut.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/src/grdcut.py b/pygmt/src/grdcut.py index 975983aa9dc..9b7db601c11 100644 --- a/pygmt/src/grdcut.py +++ b/pygmt/src/grdcut.py @@ -57,13 +57,13 @@ def grdcut(grid, **kwargs): Allow grid to be extended if new *region* exceeds existing boundaries. Give a value to initialize nodes outside current region. circ_subregion : str - ``'lon/lat/radius[unit][+n]'``. + *lon/lat/radius*\[\ *unit*\][**+n**]. Specify an origin (*lon* and *lat*) and *radius*; append a distance *unit* and we determine the corresponding rectangular region so that all grid nodes on or inside the circle are contained in the subset. If **+n** is appended we set all nodes outside the circle to NaN. z_subregion : str - ``'[min/max][+n|N|r]'``. + [*min/max*\][**+n**\|\ **N**\|\ **r**]. Determine a new rectangular region so that all nodes outside this region are also outside the given z-range [-inf/+inf]. To indicate no limit on *min* or *max* only, specify a hyphen (-). Normally, any NaNs From a7764eeef7a94842a45c39efd4f9c62ddc8f476b Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 13 Feb 2021 14:42:26 +0000 Subject: [PATCH 07/23] Update doc strings in grdfilter.py --- pygmt/src/grdfilter.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/pygmt/src/grdfilter.py b/pygmt/src/grdfilter.py index 1330c8d0528..45eda3707f3 100644 --- a/pygmt/src/grdfilter.py +++ b/pygmt/src/grdfilter.py @@ -54,11 +54,23 @@ def grdfilter(grid, **kwargs): The name of the output netCDF file with extension .nc to store the grid in. filter : str - ``xwidth[/width2][modifiers]``. - Name of filter type you which to apply, followed by the width - b: Box Car; c: Cosine Arch; g: Gaussian; o: Operator; m: Median; - p: Maximum Likelihood probability; h: histogram - Example: F='m600' for a median filter with width of 600 + **b**\|\ **c**\|\ **g**\|\ **o**\|\ **m**\|\ **p**\|\ **h**\ *xwidth*\ + [/*width2*\][*modifiers*]. + Name of filter type you which to apply, followed by the width: + + b: Box Car + + c: Cosine Arch + + g: Gaussian + + o: Operator + + m: Median + + p: Maximum Likelihood probability + + h: histogram distance : str Distance *flag* tells how grid (x,y) relates to filter width as follows: @@ -87,10 +99,11 @@ def grdfilter(grid, **kwargs): Spherical distance calculation. spacing : str - ``xinc[+e|n][/yinc[+e|n]]``. + *xinc*\[\ *unit*\][**+e**\|\ **n**] + [/*yinc*\ [*unit*][**+e**\|\ **n**]]. x_inc [and optionally y_inc] is the grid spacing. nans : str or float - ``i|p|r``. + **i**\|\ **p**\|\ **r**. Determine how NaN-values in the input grid affects the filtered output. {R} toggle : bool From 55965dd89471d9e05483b22c14543361857338ef Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 13 Feb 2021 14:48:43 +0000 Subject: [PATCH 08/23] Update doc strings in x2sys.py --- pygmt/x2sys.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pygmt/x2sys.py b/pygmt/x2sys.py index 839f977f957..82be94eea65 100644 --- a/pygmt/x2sys.py +++ b/pygmt/x2sys.py @@ -113,21 +113,22 @@ def x2sys_init(tag, **kwargs): *fmtfile*). discontinuity : str - ``d|g`` + **d**\|\ **g**. Selects geographical coordinates. Append **d** for discontinuity at the Dateline (makes longitude go from -180 to + 180) or **g** for discontinuity at Greenwich (makes longitude go from 0 to 360 [Default]). If not given we assume the data are Cartesian. spacing : str or list - ``dx[/dy]`` + *dx*\[/*dy*\]. x_inc [and optionally y_inc] is the grid spacing. Append **m** to indicate minutes or **s** to indicate seconds for geographic data. These spacings refer to the binning used in the track bin-index data base. units : str or list - ``d|sunit``. + **d**\|\ **s**\ + **c**\|\ **e**\|\ **f**\|\ **k**\|\ **m**\|\ **n**\|\ **u** . Sets the units used for distance and speed when requested by other programs. Append **d** for distance or **s** for speed, then give the desired unit as: @@ -147,7 +148,7 @@ def x2sys_init(tag, **kwargs): {V} gap : str or list - ``t|dgap``. + **t**\|\ **d**\ *gap*. Give **t** or **d** and append the corresponding maximum time gap (in user units; this is typically seconds [Infinity]), or distance (for units, see *units*) gap [Infinity]) allowed between the two data points From 1289884993ce0897033ffa1498f093c24e95b03e Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 13 Feb 2021 14:51:00 +0000 Subject: [PATCH 09/23] Update doc strings for x2sys_cross in x2sys.py --- pygmt/x2sys.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pygmt/x2sys.py b/pygmt/x2sys.py index 82be94eea65..60a447e7026 100644 --- a/pygmt/x2sys.py +++ b/pygmt/x2sys.py @@ -232,7 +232,7 @@ def x2sys_cross(tracks=None, outfile=None, **kwargs): split_file4coes.m that lives in the x2sys supplement source code. override : bool or str - ``S|N``. + **S**\|\ **N**. Control how geographic coordinates are handled (Cartesian data are unaffected). By default, we determine if the data are closer to one pole than the other, and then we use a cylindrical polar conversion to @@ -246,7 +246,7 @@ def x2sys_cross(tracks=None, outfile=None, **kwargs): longitudinal range at higher latitudes. interpolation : str - ``l|a|c``. + **l**\|\ **a**\|\ **c**. Sets the interpolation mode for estimating values at the crossover. Choose among: @@ -261,7 +261,7 @@ def x2sys_cross(tracks=None, outfile=None, **kwargs): {R} speed : str or list - ``l|u|hspeed``. + **l**\|\ **u**\|\ **h**\ *speed*. Defines window of track speeds. If speeds are outside this window we do not calculate a COE. Specify: From 6f9379e7384bb2cba0f0c2ef5af9c66057311b26 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 13 Feb 2021 14:56:59 +0000 Subject: [PATCH 10/23] Update doc strings for info.py --- pygmt/src/info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/src/info.py b/pygmt/src/info.py index 81af4ac176f..751caa828a2 100644 --- a/pygmt/src/info.py +++ b/pygmt/src/info.py @@ -45,12 +45,12 @@ def info(table, **kwargs): per_column : bool Report the min/max values per column in separate columns. spacing : str - ``'[b|p|f|s]dx[/dy[/dz...]]'``. + [**b**\|\ **p**\|\ **f**\|\ **s**]\ *dx*\[/*dy*\[/*dz*...]]. Report the min/max of the first n columns to the nearest multiple of the provided increments and output results in the form ``[w, e, s, n]``. nearest_multiple : str - ``'dz[+ccol]'`` + **dz**\[\ **+c**\ *col*]. Report the min/max of the first (0'th) column to the nearest multiple of dz and output this in the form ``[zmin, zmax, dz]``. From 6a2c992c45dd0f54fe32f00fcb30ae1339bd75d2 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sat, 13 Feb 2021 15:01:15 +0000 Subject: [PATCH 11/23] Make changed doc strings raw strings --- pygmt/figure.py | 2 +- pygmt/src/blockmedian.py | 2 +- pygmt/src/grdcut.py | 2 +- pygmt/src/grdfilter.py | 2 +- pygmt/src/info.py | 2 +- pygmt/src/makecpt.py | 2 +- pygmt/src/surface.py | 2 +- pygmt/x2sys.py | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pygmt/figure.py b/pygmt/figure.py index abfa289c769..168dea9cd18 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -115,7 +115,7 @@ def region(self): ) @kwargs_to_strings() def psconvert(self, **kwargs): - """ + r""" Convert [E]PS file(s) to other formats. Converts one or more PostScript files to other formats (BMP, EPS, JPEG, diff --git a/pygmt/src/blockmedian.py b/pygmt/src/blockmedian.py index 4927e8f565e..afdbc13476c 100644 --- a/pygmt/src/blockmedian.py +++ b/pygmt/src/blockmedian.py @@ -19,7 +19,7 @@ @use_alias(I="spacing", R="region", V="verbose") @kwargs_to_strings(R="sequence") def blockmedian(table, outfile=None, **kwargs): - """ + r""" Block average (x,y,z) data tables by median estimation. Reads arbitrarily located (x,y,z) triples [or optionally weighted diff --git a/pygmt/src/grdcut.py b/pygmt/src/grdcut.py index 9b7db601c11..1e173814c8f 100644 --- a/pygmt/src/grdcut.py +++ b/pygmt/src/grdcut.py @@ -28,7 +28,7 @@ ) @kwargs_to_strings(R="sequence") def grdcut(grid, **kwargs): - """ + r""" Extract subregion from a grid. Produce a new *outgrid* file which is a subregion of *grid*. The diff --git a/pygmt/src/grdfilter.py b/pygmt/src/grdfilter.py index 45eda3707f3..36e4e8a53c4 100644 --- a/pygmt/src/grdfilter.py +++ b/pygmt/src/grdfilter.py @@ -29,7 +29,7 @@ ) @kwargs_to_strings(R="sequence") def grdfilter(grid, **kwargs): - """ + r""" Filter a grid in the space (or time) domain. Filter a grid file in the time domain using one of the selected convolution diff --git a/pygmt/src/info.py b/pygmt/src/info.py index 751caa828a2..ac1d6450adf 100644 --- a/pygmt/src/info.py +++ b/pygmt/src/info.py @@ -17,7 +17,7 @@ @fmt_docstring @use_alias(C="per_column", I="spacing", T="nearest_multiple", V="verbose") def info(table, **kwargs): - """ + r""" Get information about data tables. Reads from files and finds the extreme values in each of the columns diff --git a/pygmt/src/makecpt.py b/pygmt/src/makecpt.py index 3599fcd748e..1a722662d37 100644 --- a/pygmt/src/makecpt.py +++ b/pygmt/src/makecpt.py @@ -26,7 +26,7 @@ ) @kwargs_to_strings(T="sequence", G="sequence") def makecpt(**kwargs): - """ + r""" Make GMT color palette tables. This is a module that will help you make static color palette tables diff --git a/pygmt/src/surface.py b/pygmt/src/surface.py index 42c79ca562a..da5d008bae8 100644 --- a/pygmt/src/surface.py +++ b/pygmt/src/surface.py @@ -20,7 +20,7 @@ @use_alias(I="spacing", R="region", G="outfile", V="verbose") @kwargs_to_strings(R="sequence") def surface(x=None, y=None, z=None, data=None, **kwargs): - """ + r""" Grids table data using adjustable tension continuous curvature splines. Surface reads randomly-spaced (x,y,z) triples and produces gridded values diff --git a/pygmt/x2sys.py b/pygmt/x2sys.py index 60a447e7026..cebf53e19ee 100644 --- a/pygmt/x2sys.py +++ b/pygmt/x2sys.py @@ -69,7 +69,7 @@ def tempfile_from_dftrack(track, suffix): ) @kwargs_to_strings(I="sequence", R="sequence") def x2sys_init(tag, **kwargs): - """ + r""" Initialize a new x2sys track database. x2sys_init is the starting point for anyone wishing to use x2sys; it @@ -178,7 +178,7 @@ def x2sys_init(tag, **kwargs): ) @kwargs_to_strings(R="sequence") def x2sys_cross(tracks=None, outfile=None, **kwargs): - """ + r""" Calculate crossovers between track data files. x2sys_cross is used to determine all intersections between ("external From 6f4f25d5c30519e1fe7d9bbc234c69543544aa91 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sun, 14 Feb 2021 06:51:23 +0000 Subject: [PATCH 12/23] Update fmt docstring --- pygmt/figure.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pygmt/figure.py b/pygmt/figure.py index 168dea9cd18..3d19d5755f4 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -154,16 +154,17 @@ def psconvert(self, **kwargs): Append the size of the subsample box (1, 2, or 4) [4]. Default is no anti-aliasing (same as bits = 1). fmt : str - Sets the output format, where *b* means BMP, *e* means EPS, *E* - means EPS with PageSize command, *f* means PDF, *F* means - multi-page PDF, *j* means JPEG, *g* means PNG, *G* means - transparent PNG (untouched regions are transparent), *m* means PPM, - *s* means SVG, and *t* means TIFF [default is JPEG]. To ``'bjgt'`` - you can append ``'+m'`` in order to get a monochrome (grayscale) - image. The EPS format can be combined with any of the other - formats. For example, ``'ef'`` creates both an EPS and a PDF file. - Using ``'F'`` creates a multi-page PDF file from the list of input - PS or PDF files. It requires the *prefix* option. + Sets the output format, where **b** means BMP, **e** means EPS, + **E** means EPS with PageSize command, **f** means PDF, **F** means + multi-page PDF, **j** means JPEG, **g** means PNG, **G** means + transparent PNG (untouched regions are transparent), **m** means + PPM, **s** means SVG, and **t** means TIFF [default is JPEG]. To + **b**\|\ **j**\|\ **g**\|\ **t**\ , optionally append **+m** in + order to get a monochrome (grayscale) image. The EPS format can be + combined with any of the other formats. For example, **ef** creates + both an EPS and a PDF file. Using **F** creates a multi-page PDF + file from the list of input PS or PDF files. It requires the + ``prefix`` option. """ kwargs = self._preprocess(**kwargs) # Default cropping the figure to True From 5f1fd460171530abf5afcc15e52c31fb4608030a Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sun, 14 Feb 2021 06:56:39 +0000 Subject: [PATCH 13/23] Formatting fixes --- pygmt/src/blockmedian.py | 3 ++- pygmt/src/grdfilter.py | 12 ++++++------ pygmt/src/info.py | 11 ++++++----- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/pygmt/src/blockmedian.py b/pygmt/src/blockmedian.py index afdbc13476c..352198c339d 100644 --- a/pygmt/src/blockmedian.py +++ b/pygmt/src/blockmedian.py @@ -48,7 +48,8 @@ def blockmedian(table, outfile=None, **kwargs): Specify the region of interest. outfile : str - Required if 'table' is a file. The file name for the output ASCII file. + Required if ``table`` is a file. The file name for the output ASCII + file. {V} diff --git a/pygmt/src/grdfilter.py b/pygmt/src/grdfilter.py index 36e4e8a53c4..4dcaf9258da 100644 --- a/pygmt/src/grdfilter.py +++ b/pygmt/src/grdfilter.py @@ -35,12 +35,12 @@ def grdfilter(grid, **kwargs): Filter a grid file in the time domain using one of the selected convolution or non-convolution isotropic or rectangular filters and compute distances using Cartesian or Spherical geometries. The output grid file can - optionally be generated as a sub-region of the input (via *region*) and/or - with new increment (via *spacing*) or registration (via *toggle*). In this - way, one may have "extra space" in the input data so that the edges will - not be used and the output can be within one half-width of the input edges. - If the filter is low-pass, then the output may be less frequently sampled - than the input. + optionally be generated as a sub-region of the input (via ``region``) + and/or with new increment (via ``spacing``) or registration + (via ``toggle``). In this way, one may have "extra space" in the input + data so that the edges will not be used and the output can be within one + half-width of the input edges. If the filter is low-pass, then the output + may be less frequently sampled than the input. Full option list at :gmt-docs:`grdfilter.html` diff --git a/pygmt/src/info.py b/pygmt/src/info.py index ac1d6450adf..0d70cdb8f8b 100644 --- a/pygmt/src/info.py +++ b/pygmt/src/info.py @@ -26,11 +26,12 @@ def info(table, **kwargs): find the extent of the first two columns rounded up and down to the nearest multiple of the supplied increments given by *spacing*. Such output will be in a numpy.ndarray form ``[w, e, s, n]``, which can be used directly as the - *region* argument for other modules (hence only dx and dy are needed). If - the *per_column* option is combined with *spacing*, then the numpy.ndarray - output will be rounded up/down for as many columns as there are increments - provided in *spacing*. A similar option *nearest_multiple* option will - provide a numpy.ndarray in the form of ``[zmin, zmax, dz]`` for makecpt. + ``region`` argument for other modules (hence only dx and dy are needed). + If the ``per_column`` option is combined with ``spacing``, then the + numpy.ndarray output will be rounded up/down for as many columns as there + are increments provided in ``spacing``. A similar option + ``nearest_multiple`` option will provide a numpy.ndarray in the form of + ``[zmin, zmax, dz]`` for makecpt. Full option list at :gmt-docs:`gmtinfo.html` From 0c08776f440b8f4c7ab3c0e3d1a425c3fbff4d06 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sun, 14 Feb 2021 06:57:55 +0000 Subject: [PATCH 14/23] Update output docstring in info.py --- pygmt/src/info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/src/info.py b/pygmt/src/info.py index 0d70cdb8f8b..4334ae0399a 100644 --- a/pygmt/src/info.py +++ b/pygmt/src/info.py @@ -60,8 +60,8 @@ def info(table, **kwargs): Returns ------- output : np.ndarray or str - Return type depends on whether any of the 'per_column', 'spacing', or - 'nearest_multiple' parameters are set. + Return type depends on whether any of the ``per_column``, + ``spacing``, or ``nearest_multiple`` parameters are set. - np.ndarray if either of the above parameters are used. - str if none of the above parameters are used. From 8bcd2ab043cd07313a42fe487a3acc48a940fb5b Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sun, 14 Feb 2021 07:01:18 +0000 Subject: [PATCH 15/23] Update formatting in makecpt.py --- pygmt/src/makecpt.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pygmt/src/makecpt.py b/pygmt/src/makecpt.py index 1a722662d37..a149b7d3dae 100644 --- a/pygmt/src/makecpt.py +++ b/pygmt/src/makecpt.py @@ -31,7 +31,7 @@ def makecpt(**kwargs): This is a module 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 + 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 CPT based on an existing master (dynamic) CPT. The resulting CPT can be reversed relative to the master cpt, and can be made continuous or @@ -49,8 +49,8 @@ def makecpt(**kwargs): the new master file. If not, the parameters :gmt-term:`COLOR_BACKGROUND`, :gmt-term:`COLOR_FOREGROUND`, and :gmt-term:`COLOR_NAN` from the :gmt-docs:`gmt.conf ` file or the command line will be used. This - default behavior can be overruled using the options *background*, - *overrule_bg* or *no_bg*. + default behavior can be overruled using the options ``background``, + ``overrule_bg`` or ``no_bg``. The color model (RGB, HSV or CMYK) of the palette created by **makecpt** will be the same as specified in the header of the master CPT. When there @@ -90,7 +90,7 @@ def makecpt(**kwargs): CPT is plotted. The *label* may be a comma-separated list of category names (you can skip a category by not giving a name), or give *start*[-], where we automatically build monotonically increasing - labels from *start* (a single letter or an integer). Append - to build + labels from *start*\ (a single letter or an integer). Append - to build ranges *start*-*start+1* instead. series : list or str [*min/max/inc*\ [**+b**\|\ **l**\|\ **n**\ ]\|\ *file*\|\ *list*\ ]. @@ -112,11 +112,11 @@ def makecpt(**kwargs): file. If not given or False (default), saves the CPT as the session current CPT. reverse : str - Set this to True or c [Default] to reverse the sense of color + Set this to True or **c**\ [Default] to reverse the sense of color progression in the master CPT. Set this to z to reverse the sign of z-values in the color table. Note that this change of z-direction - happens before *truncate* and *series* values are used so the latter - must be compatible with the changed *z*-range. See also + happens before ``truncate`` and ``series`` values are used so the + latter must be compatible with the changed *z*-range. See also :gmt-docs:`cookbook/features.html#manipulating-cpts`. overrule_bg : str Overrule background, foreground, and NaN colors specified in the master From de9de6dfb38735603ddf2fca7feb4c014a92a1ba Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sun, 14 Feb 2021 07:02:52 +0000 Subject: [PATCH 16/23] Apply suggestions from code review Co-authored-by: Meghan Jones Co-authored-by: Dongdong Tian --- pygmt/figure.py | 8 ++++---- pygmt/src/blockmedian.py | 2 +- pygmt/src/grdcut.py | 4 ++-- pygmt/src/grdfilter.py | 2 +- pygmt/src/surface.py | 2 +- pygmt/x2sys.py | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pygmt/figure.py b/pygmt/figure.py index 3d19d5755f4..c875638dae9 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -151,8 +151,8 @@ def psconvert(self, **kwargs): anti_aliasing : str [**g**\|\ **p**\|\ **t**\][**1**\|\ **2**\|\ **4**]. Set the anti-aliasing options for **g**\ raphics or **t**\ ext. - Append the size of the subsample box (1, 2, or 4) [4]. Default is - no anti-aliasing (same as bits = 1). + Append the size of the subsample box (1, 2, or 4) [4]. [Default is + no anti-aliasing (same as bits = 1)]. fmt : str Sets the output format, where **b** means BMP, **e** means EPS, **E** means EPS with PageSize command, **f** means PDF, **F** means @@ -180,7 +180,7 @@ def savefig( Save the figure to a file. This method implements a matplotlib-like interface for - :doc:psconvert . + :meth:`pygmt.Figure.psconvert`. Supported formats: PNG (``.png``), JPEG (``.jpg``), PDF (``.pdf``), BMP (``.bmp``), TIFF (``.tif``), EPS (``.eps``), and KML (``.kml``). @@ -202,7 +202,7 @@ def savefig( anti_alias: bool If True, will use anti aliasing when creating raster images (PNG, JPG, TIFF). More specifically, it uses options ``t2, g2`` in - :doc:psconvert . Ignored if creating vector graphics. + :meth:`pygmt.Figure.psconvert`. Ignored if creating vector graphics. show: bool If True, will open the figure in an external viewer. dpi : int diff --git a/pygmt/src/blockmedian.py b/pygmt/src/blockmedian.py index 352198c339d..0af32ff714f 100644 --- a/pygmt/src/blockmedian.py +++ b/pygmt/src/blockmedian.py @@ -41,7 +41,7 @@ def blockmedian(table, outfile=None, **kwargs): spacing : str *xinc*\[\ *unit*\][**+e**\|\ **n**] [/*yinc*\ [*unit*][**+e**\|\ **n**]]. - x_inc [and optionally y_inc] is the grid spacing. + *xinc* [and optionally *yinc*] is the grid spacing. region : str or list *xmin/xmax/ymin/ymax*\[\ **+r**\][**+u**\ *unit*]. diff --git a/pygmt/src/grdcut.py b/pygmt/src/grdcut.py index 1e173814c8f..40a00df86a3 100644 --- a/pygmt/src/grdcut.py +++ b/pygmt/src/grdcut.py @@ -31,7 +31,7 @@ def grdcut(grid, **kwargs): r""" Extract subregion from a grid. - Produce a new *outgrid* file which is a subregion of *grid*. The + 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 @@ -54,7 +54,7 @@ def grdcut(grid, **kwargs): {J} {R} extend : bool or int or float - Allow grid to be extended if new *region* exceeds existing boundaries. + Allow grid to be extended if new ``region`` exceeds existing boundaries. Give a value to initialize nodes outside current region. circ_subregion : str *lon/lat/radius*\[\ *unit*\][**+n**]. diff --git a/pygmt/src/grdfilter.py b/pygmt/src/grdfilter.py index 4dcaf9258da..702ed009742 100644 --- a/pygmt/src/grdfilter.py +++ b/pygmt/src/grdfilter.py @@ -101,7 +101,7 @@ def grdfilter(grid, **kwargs): spacing : str *xinc*\[\ *unit*\][**+e**\|\ **n**] [/*yinc*\ [*unit*][**+e**\|\ **n**]]. - x_inc [and optionally y_inc] is the grid spacing. + *xinc* [and optionally *yinc*] is the grid spacing. nans : str or float **i**\|\ **p**\|\ **r**. Determine how NaN-values in the input grid affects the filtered output. diff --git a/pygmt/src/surface.py b/pygmt/src/surface.py index da5d008bae8..b824311e665 100644 --- a/pygmt/src/surface.py +++ b/pygmt/src/surface.py @@ -49,7 +49,7 @@ def surface(x=None, y=None, z=None, data=None, **kwargs): spacing : str *xinc*\[\ *unit*\][**+e**\|\ **n**] [/*yinc*\ [*unit*][**+e**\|\ **n**]]. - x_inc [and optionally y_inc] is the grid spacing. + *xinc* [and optionally *yinc*] is the grid spacing. region : str or list *xmin/xmax/ymin/ymax*\[\ **+r**\][**+u**\ *unit*]. diff --git a/pygmt/x2sys.py b/pygmt/x2sys.py index cebf53e19ee..542269322bb 100644 --- a/pygmt/x2sys.py +++ b/pygmt/x2sys.py @@ -121,7 +121,7 @@ def x2sys_init(tag, **kwargs): spacing : str or list *dx*\[/*dy*\]. - x_inc [and optionally y_inc] is the grid spacing. Append **m** to + *dx* [and optionally *dy*] is the grid spacing. Append **m** to indicate minutes or **s** to indicate seconds for geographic data. These spacings refer to the binning used in the track bin-index data base. @@ -151,7 +151,7 @@ def x2sys_init(tag, **kwargs): **t**\|\ **d**\ *gap*. Give **t** or **d** and append the corresponding maximum time gap (in user units; this is typically seconds [Infinity]), or distance (for - units, see *units*) gap [Infinity]) allowed between the two data points + units, see ``units``) gap [Default is infinity]) allowed between the two data points immediately on either side of a crossover. If these limits are exceeded then a data gap is assumed and no COE will be determined. From a84649ebe51947d6618334dd51340775cc538008 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sun, 14 Feb 2021 07:05:37 +0000 Subject: [PATCH 17/23] Formatting fixes --- pygmt/figure.py | 3 ++- pygmt/src/grdcut.py | 4 ++-- pygmt/x2sys.py | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pygmt/figure.py b/pygmt/figure.py index c875638dae9..6d8609a0d72 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -202,7 +202,8 @@ def savefig( anti_alias: bool If True, will use anti aliasing when creating raster images (PNG, JPG, TIFF). More specifically, it uses options ``t2, g2`` in - :meth:`pygmt.Figure.psconvert`. Ignored if creating vector graphics. + :meth:`pygmt.Figure.psconvert`. Ignored if creating vector + graphics. show: bool If True, will open the figure in an external viewer. dpi : int diff --git a/pygmt/src/grdcut.py b/pygmt/src/grdcut.py index 40a00df86a3..2f5277d1535 100644 --- a/pygmt/src/grdcut.py +++ b/pygmt/src/grdcut.py @@ -54,8 +54,8 @@ def grdcut(grid, **kwargs): {J} {R} extend : bool or int or float - Allow grid to be extended if new ``region`` exceeds existing boundaries. - Give a value to initialize nodes outside current region. + Allow grid to be extended if new ``region`` exceeds existing + boundaries. Give a value to initialize nodes outside current region. circ_subregion : str *lon/lat/radius*\[\ *unit*\][**+n**]. Specify an origin (*lon* and *lat*) and *radius*; append a distance diff --git a/pygmt/x2sys.py b/pygmt/x2sys.py index 542269322bb..0dd2d6b6414 100644 --- a/pygmt/x2sys.py +++ b/pygmt/x2sys.py @@ -151,9 +151,9 @@ def x2sys_init(tag, **kwargs): **t**\|\ **d**\ *gap*. Give **t** or **d** and append the corresponding maximum time gap (in user units; this is typically seconds [Infinity]), or distance (for - units, see ``units``) gap [Default is infinity]) allowed between the two data points - immediately on either side of a crossover. If these limits are exceeded - then a data gap is assumed and no COE will be determined. + units, see ``units``) gap [Default is infinity]) allowed between the + two data points immediately on either side of a crossover. If these + limits are exceeded then a data gap is assumed and no COE will be determined. {j} """ From 4e6c6d27bf8741c8c0bab13fa8c97b6773ca2f17 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sun, 14 Feb 2021 07:08:15 +0000 Subject: [PATCH 18/23] Formatting fix --- pygmt/x2sys.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pygmt/x2sys.py b/pygmt/x2sys.py index 0dd2d6b6414..27f6ea5f47f 100644 --- a/pygmt/x2sys.py +++ b/pygmt/x2sys.py @@ -153,7 +153,8 @@ def x2sys_init(tag, **kwargs): user units; this is typically seconds [Infinity]), or distance (for units, see ``units``) gap [Default is infinity]) allowed between the two data points immediately on either side of a crossover. If these - limits are exceeded then a data gap is assumed and no COE will be determined. + limits are exceeded then a data gap is assumed and no COE will be + determined. {j} """ From c57bc9da8ef860ca14833b844e53b6038ec80907 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sun, 14 Feb 2021 18:41:13 +0000 Subject: [PATCH 19/23] Apply suggestions from code review Co-authored-by: Dongdong Tian --- pygmt/figure.py | 5 +++-- pygmt/src/info.py | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pygmt/figure.py b/pygmt/figure.py index 6d8609a0d72..500dd8f190c 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -164,7 +164,7 @@ def psconvert(self, **kwargs): combined with any of the other formats. For example, **ef** creates both an EPS and a PDF file. Using **F** creates a multi-page PDF file from the list of input PS or PDF files. It requires the - ``prefix`` option. + ``prefix`` parameter. """ kwargs = self._preprocess(**kwargs) # Default cropping the figure to True @@ -201,7 +201,8 @@ def savefig( If True, will crop the figure canvas (page) to the plot area. anti_alias: bool If True, will use anti aliasing when creating raster images (PNG, - JPG, TIFF). More specifically, it uses options ``t2, g2`` in + JPG, TIFF). More specifically, it passes arguments ``t2`` + and ``g2`` to the ``anti_aliasing`` parameter of :meth:`pygmt.Figure.psconvert`. Ignored if creating vector graphics. show: bool diff --git a/pygmt/src/info.py b/pygmt/src/info.py index 4334ae0399a..622862d3f6a 100644 --- a/pygmt/src/info.py +++ b/pygmt/src/info.py @@ -24,14 +24,14 @@ def info(table, **kwargs): reported as min/max pairs. It recognizes NaNs and will print warnings if the number of columns vary from record to record. As an option, it will find the extent of the first two columns rounded up and down to the nearest - multiple of the supplied increments given by *spacing*. Such output will be - in a numpy.ndarray form ``[w, e, s, n]``, which can be used directly as the - ``region`` argument for other modules (hence only dx and dy are needed). - If the ``per_column`` option is combined with ``spacing``, then the + multiple of the supplied increments given by ``spacing``. Such output will be + in a numpy.ndarray form [*w*, *e*, *s*, *n*], which can be used directly as the + ``region`` parameter for other modules (hence only *dx* and *dy* are needed). + If the ``per_column`` parameter is combined with ``spacing``, then the numpy.ndarray output will be rounded up/down for as many columns as there - are increments provided in ``spacing``. A similar option + are increments provided in ``spacing``. A similar parameter ``nearest_multiple`` option will provide a numpy.ndarray in the form of - ``[zmin, zmax, dz]`` for makecpt. + [*zmin*, *zmax*, *dz*]`` for makecpt. Full option list at :gmt-docs:`gmtinfo.html` From 62e694d92c30574df2848dc5bb16d78bef936c45 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sun, 14 Feb 2021 18:43:15 +0000 Subject: [PATCH 20/23] Format fix --- pygmt/figure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/figure.py b/pygmt/figure.py index 500dd8f190c..895625009b9 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -201,7 +201,7 @@ def savefig( If True, will crop the figure canvas (page) to the plot area. anti_alias: bool If True, will use anti aliasing when creating raster images (PNG, - JPG, TIFF). More specifically, it passes arguments ``t2`` + JPG, TIFF). More specifically, it passes arguments ``t2`` and ``g2`` to the ``anti_aliasing`` parameter of :meth:`pygmt.Figure.psconvert`. Ignored if creating vector graphics. From 3edc108616eea993c072abd22beda9f9ee140190 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sun, 14 Feb 2021 18:44:17 +0000 Subject: [PATCH 21/23] Apply suggestions from code review Co-authored-by: Dongdong Tian --- pygmt/src/makecpt.py | 12 ++++++------ pygmt/src/surface.py | 4 ++-- pygmt/x2sys.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pygmt/src/makecpt.py b/pygmt/src/makecpt.py index a149b7d3dae..1ecfff0dfba 100644 --- a/pygmt/src/makecpt.py +++ b/pygmt/src/makecpt.py @@ -49,7 +49,7 @@ def makecpt(**kwargs): the new master file. If not, the parameters :gmt-term:`COLOR_BACKGROUND`, :gmt-term:`COLOR_FOREGROUND`, and :gmt-term:`COLOR_NAN` from the :gmt-docs:`gmt.conf ` file or the command line will be used. This - default behavior can be overruled using the options ``background``, + default behavior can be overruled using the parameters ``background``, ``overrule_bg`` or ``no_bg``. The color model (RGB, HSV or CMYK) of the palette created by **makecpt** @@ -81,7 +81,7 @@ def makecpt(**kwargs): ``background='i'`` to match the colors for the lowest and highest values in the input (instead of the output) CPT. color_model : - [**R**\|\ **r**\|\ **h**\|\ **c**\ ][**+c**\ [*label*\ ]]. + [**R**\|\ **r**\|\ **h**\|\ **c**][**+c**\ [*label*]]. Force output CPT to be written with r/g/b codes, gray-scale values or color name (**R**, default) or r/g/b codes only (**r**), or h-s-v codes (**h**), or c/m/y/k codes (**c**). Optionally or alternatively, append @@ -90,10 +90,10 @@ def makecpt(**kwargs): CPT is plotted. The *label* may be a comma-separated list of category names (you can skip a category by not giving a name), or give *start*[-], where we automatically build monotonically increasing - labels from *start*\ (a single letter or an integer). Append - to build + labels from *start* (a single letter or an integer). Append - to build ranges *start*-*start+1* instead. series : list or str - [*min/max/inc*\ [**+b**\|\ **l**\|\ **n**\ ]\|\ *file*\|\ *list*\ ]. + [*min/max/inc*\[**+b**\|\ **l**\|\ **n**]\|\ *file*\|\ *list*]. Defines the range of the new CPT by giving the lowest and highest z-value (and optionally an interval). If this is not given, the existing range in the master CPT will be used intact. The values @@ -102,9 +102,9 @@ def makecpt(**kwargs): For details on array creation, see :gmt-docs:`makecpt.html#generate-1d-array`. truncate : list or str - *zlo/zhi*\ . + *zlow/zhigh*. Truncate the incoming CPT so that the lowest and highest z-levels are - to *zlo* and *zhi*. If one of these equal NaN then we leave that end of + to *zlow* and *zhigh*. If one of these equal NaN then we leave that end of the CPT alone. The truncation takes place before any resampling. See also :gmt-docs:`cookbook/features.html#manipulating-cpts`. output : str diff --git a/pygmt/src/surface.py b/pygmt/src/surface.py index b824311e665..24ba883c4e2 100644 --- a/pygmt/src/surface.py +++ b/pygmt/src/surface.py @@ -47,12 +47,12 @@ def surface(x=None, y=None, z=None, data=None, **kwargs): Either a data file name or a 2d numpy array with the tabular data. spacing : str - *xinc*\[\ *unit*\][**+e**\|\ **n**] + *xinc*\[\ *unit*\][**+e**\|\ **n**]\ [/*yinc*\ [*unit*][**+e**\|\ **n**]]. *xinc* [and optionally *yinc*] is the grid spacing. region : str or list - *xmin/xmax/ymin/ymax*\[\ **+r**\][**+u**\ *unit*]. + *xmin/xmax/ymin/ymax*\[**+r**][**+u**\ *unit*]. Specify the region of interest. outfile : str diff --git a/pygmt/x2sys.py b/pygmt/x2sys.py index 27f6ea5f47f..064ecdb2c43 100644 --- a/pygmt/x2sys.py +++ b/pygmt/x2sys.py @@ -120,7 +120,7 @@ def x2sys_init(tag, **kwargs): [Default]). If not given we assume the data are Cartesian. spacing : str or list - *dx*\[/*dy*\]. + *dx*\[/*dy*]. *dx* [and optionally *dy*] is the grid spacing. Append **m** to indicate minutes or **s** to indicate seconds for geographic data. These spacings refer to the binning used in the track bin-index data From 3619286b0f49e2a15aef691f8e16056cc9c74710 Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sun, 14 Feb 2021 18:50:52 +0000 Subject: [PATCH 22/23] Format fix --- pygmt/src/info.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pygmt/src/info.py b/pygmt/src/info.py index 622862d3f6a..490f820abc1 100644 --- a/pygmt/src/info.py +++ b/pygmt/src/info.py @@ -24,14 +24,14 @@ def info(table, **kwargs): reported as min/max pairs. It recognizes NaNs and will print warnings if the number of columns vary from record to record. As an option, it will find the extent of the first two columns rounded up and down to the nearest - multiple of the supplied increments given by ``spacing``. Such output will be - in a numpy.ndarray form [*w*, *e*, *s*, *n*], which can be used directly as the - ``region`` parameter for other modules (hence only *dx* and *dy* are needed). - If the ``per_column`` parameter is combined with ``spacing``, then the - numpy.ndarray output will be rounded up/down for as many columns as there - are increments provided in ``spacing``. A similar parameter - ``nearest_multiple`` option will provide a numpy.ndarray in the form of - [*zmin*, *zmax*, *dz*]`` for makecpt. + multiple of the supplied increments given by ``spacing``. Such output will + be in a numpy.ndarray form [*w*, *e*, *s*, *n*], which can be used + directly as the ``region`` parameter for other modules (hence only *dx* + and *dy* are needed). If the ``per_column`` parameter is combined with + ``spacing``, then the numpy.ndarray output will be rounded up/down for as + many columns as there are increments provided in ``spacing``. A similar + parameter ``nearest_multiple`` option will provide a numpy.ndarray in the + form of [*zmin*, *zmax*, *dz*]`` for makecpt. Full option list at :gmt-docs:`gmtinfo.html` From 59808eedf94702a0c6a5f50bc8166ed822d71cae Mon Sep 17 00:00:00 2001 From: Will Schlitzer Date: Sun, 14 Feb 2021 19:26:56 +0000 Subject: [PATCH 23/23] Format fix --- pygmt/src/makecpt.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pygmt/src/makecpt.py b/pygmt/src/makecpt.py index 1ecfff0dfba..744f7158542 100644 --- a/pygmt/src/makecpt.py +++ b/pygmt/src/makecpt.py @@ -104,8 +104,9 @@ def makecpt(**kwargs): truncate : list or str *zlow/zhigh*. Truncate the incoming CPT so that the lowest and highest z-levels are - to *zlow* and *zhigh*. If one of these equal NaN then we leave that end of - the CPT alone. The truncation takes place before any resampling. See + to *zlow* and *zhigh*. If one of these equal NaN then we leave that + end of the CPT alone. The truncation takes place before any + resampling. See also :gmt-docs:`cookbook/features.html#manipulating-cpts`. output : str Optional. The file name with extension .cpt to store the generated CPT