diff --git a/pygmt/src/grd2xyz.py b/pygmt/src/grd2xyz.py index 0ff26af6298..f7b70ea8c58 100644 --- a/pygmt/src/grd2xyz.py +++ b/pygmt/src/grd2xyz.py @@ -138,8 +138,8 @@ def grd2xyz(grid, output_type="pandas", outfile=None, **kwargs): >>> xyz_dataframe = pygmt.grd2xyz(grid=grid, output_type="pandas") >>> xyz_dataframe.head(n=2) lon lat elevation - 0 10.0 25.0 863.0 - 1 10.5 25.0 985.5 + 0 10.0 25.0 965.5 + 1 10.5 25.0 876.5 """ output_type = validate_output_table_type(output_type, outfile=outfile) diff --git a/pygmt/src/grdclip.py b/pygmt/src/grdclip.py index 87f635d0487..878d9db3af2 100644 --- a/pygmt/src/grdclip.py +++ b/pygmt/src/grdclip.py @@ -87,7 +87,7 @@ def grdclip(grid, **kwargs): ... ) >>> # Report the minimum and maximum data values >>> [grid.data.min(), grid.data.max()] - [170.0, 2275.5] + [183.5, 1807.0] >>> # Create a new grid from an input grid. Set all values below 1,000 to >>> # 0 and all values above 1,500 to 10,000 >>> new_grid = pygmt.grdclip(grid=grid, below=[1000, 0], above=[1500, 10000]) diff --git a/pygmt/src/grdhisteq.py b/pygmt/src/grdhisteq.py index c804d8f8f28..c9524aa1ab4 100644 --- a/pygmt/src/grdhisteq.py +++ b/pygmt/src/grdhisteq.py @@ -299,11 +299,11 @@ def compute_bins( >>> print(bins) start stop bin_id - 0 170.0 389.0 - 1 389.0 470.5 - 2 470.5 571.0 - 3 571.0 705.0 - 4 705.0 2275.5 + 0 183.5 395.0 + 1 395.0 472.0 + 2 472.0 575.0 + 3 575.0 709.5 + 4 709.5 1807.0 See Also -------- diff --git a/pygmt/src/grdproject.py b/pygmt/src/grdproject.py index 68e75636164..c934bea2e02 100644 --- a/pygmt/src/grdproject.py +++ b/pygmt/src/grdproject.py @@ -103,13 +103,10 @@ def grdproject(grid, **kwargs): >>> import pygmt >>> # Load a grid of @earth_relief_30m data, with a longitude range of >>> # 10° E to 30° E, and a latitude range of 15° N to 25° N - >>> grid = pygmt.datasets.load_earth_relief( - ... resolution="30m", region=[10, 30, 15, 25] - ... ) - >>> # Create a new grid from the input grid, set the projection to - >>> # Mercator, and set inverse to "True" to change from "geographic" - >>> # to "rectangular" - >>> new_grid = pygmt.grdproject(grid=grid, projection="M10c", inverse=True) + >>> region = [10, 30, 15, 25] + >>> grid = pygmt.datasets.load_earth_relief(resolution="30m", region=region) + >>> # Project the geographic gridded data onto a rectangular grid + >>> new_grid = pygmt.grdproject(grid=grid, projection="M10c", region=region) """ if kwargs.get("J") is None: raise GMTInvalidInput("The projection must be specified.") diff --git a/pygmt/src/grdvolume.py b/pygmt/src/grdvolume.py index a4c7d3937f6..70d99e19b82 100644 --- a/pygmt/src/grdvolume.py +++ b/pygmt/src/grdvolume.py @@ -94,11 +94,11 @@ def grdvolume(grid, output_type="pandas", outfile=None, **kwargs): ... ) >>> print(output_dataframe) 0 1 2 3 - 0 200 2.318187e+12 8.533727e+14 368.120722 - 1 250 2.272471e+12 7.383936e+14 324.929840 - 2 300 2.162074e+12 6.273066e+14 290.141086 - 3 350 2.018302e+12 5.222640e+14 258.764032 - 4 400 1.857370e+12 4.252699e+14 228.963499 + 0 200 2.323600e+12 8.523815e+14 366.836554 + 1 250 2.275864e+12 7.371655e+14 323.905736 + 2 300 2.166707e+12 6.258570e+14 288.851699 + 3 350 2.019284e+12 5.207732e+14 257.899955 + 4 400 1.870441e+12 4.236191e+14 226.480847 """ output_type = validate_output_table_type(output_type, outfile=outfile)