diff --git a/pygmt/alias.py b/pygmt/alias.py index 7e1344c104d..6ab0b130066 100644 --- a/pygmt/alias.py +++ b/pygmt/alias.py @@ -335,6 +335,8 @@ def add_common(self, **kwargs): name="registration", mapping={"gridline": "g", "pixel": "p"}, ) + case "p": + alias = Alias(value, name="perspective", sep="/", size={2, 3}) case "t": alias = Alias(value, name="transparency") case "x": diff --git a/pygmt/helpers/decorators.py b/pygmt/helpers/decorators.py index fa5b6ae2e85..fb6ecdf7645 100644 --- a/pygmt/helpers/decorators.py +++ b/pygmt/helpers/decorators.py @@ -262,12 +262,25 @@ pen : str Set pen attributes for lines or the outline of symbols.""", "perspective": r""" - perspective : list or str - [**x**\|\ **y**\|\ **z**]\ *azim*\[/*elev*\[/*zlevel*]]\ - [**+w**\ *lon0*/*lat0*\[/*z0*]][**+v**\ *x0*/*y0*]. - Select perspective view and set the azimuth and elevation angle of - the viewpoint [Default is ``[180, 90]``]. Full documentation is at - :gmt-docs:`gmt.html#perspective-full`.""", + perspective + Select perspective view and set the azimuth and elevation of the viewpoint. + + Accepts a single value or a sequence of two or three values: *azimuth*, + (*azimuth*, *elevation*), or (*azimuth*, *elevation*, *zlevel*). + + - *azimuth*: Azimuth angle of the viewpoint in degrees [Default is 180, + i.e., looking from south to north]. + - *elevation*: Elevation angle of the viewpoint above the horizon [Default + is 90, i.e., looking straight down at nadir]. + - *zlevel*: Z-level at which 2-D elements (e.g., the map frame) are drawn. + Only applied when used together with ``zsize`` or ``zscale``. [Default is + at the bottom of the z-axis]. + + Alternatively, set ``perspective=True`` to reuse the perspective setting + from the previous plotting method, or pass a string following the full + GMT syntax for finer control (e.g., adding ``+w`` or ``+v`` modifiers to + select an axis location other than the plot origin). See + :gmt-docs:`gmt.html#perspective-full` for details.""", "projection": r""" projection *projcode*\[*projparams*/]\ *width*\|\ *scale*. diff --git a/pygmt/src/basemap.py b/pygmt/src/basemap.py index 9299b96b017..1e1270d96e9 100644 --- a/pygmt/src/basemap.py +++ b/pygmt/src/basemap.py @@ -7,7 +7,7 @@ from pygmt.alias import Alias, AliasSystem from pygmt.clib import Session -from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias +from pygmt.helpers import build_arg_list, fmt_docstring, use_alias @fmt_docstring @@ -17,9 +17,7 @@ Td="rose", Tm="compass", f="coltypes", - p="perspective", ) -@kwargs_to_strings(p="sequence") def basemap( self, projection: str | None = None, @@ -31,6 +29,7 @@ def basemap( | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -54,6 +53,7 @@ def basemap( - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -109,6 +109,7 @@ def basemap( R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/coast.py b/pygmt/src/coast.py index fa2884c005c..9f54ffcafe0 100644 --- a/pygmt/src/coast.py +++ b/pygmt/src/coast.py @@ -12,7 +12,6 @@ args_in_kwargs, build_arg_list, fmt_docstring, - kwargs_to_strings, use_alias, ) from pygmt.params import Box @@ -31,9 +30,7 @@ N="borders", S="water", W="shorelines", - p="perspective", ) -@kwargs_to_strings(p="sequence") def coast( self, resolution: Literal[ @@ -47,6 +44,7 @@ def coast( | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -76,6 +74,7 @@ def coast( - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -229,6 +228,7 @@ def coast( R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/colorbar.py b/pygmt/src/colorbar.py index 93f1b43066c..5cbcfec8da1 100644 --- a/pygmt/src/colorbar.py +++ b/pygmt/src/colorbar.py @@ -15,16 +15,9 @@ @fmt_docstring @use_alias( - C="cmap", - D="position", - G="truncate", - L="equalsize", - Q="log", - W="scale", - Z="zfile", - p="perspective", + C="cmap", D="position", G="truncate", L="equalsize", Q="log", W="scale", Z="zfile" ) -@kwargs_to_strings(G="sequence", I="sequence", p="sequence") +@kwargs_to_strings(G="sequence", I="sequence") def colorbar( self, shading: float | Sequence[float] | bool = False, @@ -36,6 +29,7 @@ def colorbar( | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -70,6 +64,7 @@ def colorbar( - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -173,6 +168,7 @@ def colorbar( R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/contour.py b/pygmt/src/contour.py index fcce565012e..b4cd956a90e 100644 --- a/pygmt/src/contour.py +++ b/pygmt/src/contour.py @@ -32,9 +32,8 @@ h="header", i="incols", l="label", - p="perspective", ) -@kwargs_to_strings(i="sequence_comma", p="sequence") +@kwargs_to_strings(i="sequence_comma") def contour( # noqa: PLR0913 self, data: PathLike | TableLike | None = None, @@ -49,6 +48,7 @@ def contour( # noqa: PLR0913 | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -68,6 +68,7 @@ def contour( # noqa: PLR0913 - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -171,6 +172,7 @@ def contour( # noqa: PLR0913 R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/grdcontour.py b/pygmt/src/grdcontour.py index f0511ddbcb0..925147e47c0 100644 --- a/pygmt/src/grdcontour.py +++ b/pygmt/src/grdcontour.py @@ -33,9 +33,8 @@ W="pen", l="label", f="coltypes", - p="perspective", ) -@kwargs_to_strings(L="sequence", p="sequence") +@kwargs_to_strings(L="sequence") def grdcontour( self, grid: PathLike | xr.DataArray, @@ -46,6 +45,7 @@ def grdcontour( | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -61,6 +61,7 @@ def grdcontour( - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -172,6 +173,7 @@ def grdcontour( R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/grdimage.py b/pygmt/src/grdimage.py index a0d1c52d22d..fdd5dced557 100644 --- a/pygmt/src/grdimage.py +++ b/pygmt/src/grdimage.py @@ -9,7 +9,7 @@ from pygmt._typing import PathLike from pygmt.alias import Alias, AliasSystem from pygmt.clib import Session -from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias +from pygmt.helpers import build_arg_list, fmt_docstring, use_alias __doctest_skip__ = ["grdimage"] @@ -24,9 +24,7 @@ Q="nan_transparent", n="interpolation", f="coltypes", - p="perspective", ) -@kwargs_to_strings(p="sequence") def grdimage( # noqa: PLR0913 self, grid: PathLike | xr.DataArray, @@ -39,6 +37,7 @@ def grdimage( # noqa: PLR0913 | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, cores: int | bool = False, **kwargs, ): @@ -83,6 +82,7 @@ def grdimage( # noqa: PLR0913 - R = region - V = verbose - c = panel + - p = perspective - t = transparency - x = cores @@ -187,6 +187,7 @@ def grdimage( # noqa: PLR0913 R=region, V=verbose, c=panel, + p=perspective, t=transparency, x=cores, ) diff --git a/pygmt/src/grdview.py b/pygmt/src/grdview.py index 9d2647db290..0a62dd4f79e 100644 --- a/pygmt/src/grdview.py +++ b/pygmt/src/grdview.py @@ -9,7 +9,7 @@ from pygmt._typing import PathLike from pygmt.alias import Alias, AliasSystem from pygmt.clib import Session -from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias +from pygmt.helpers import build_arg_list, fmt_docstring, use_alias __doctest_skip__ = ["grdview"] @@ -26,10 +26,8 @@ I="shading", f="coltypes", n="interpolation", - p="perspective", ) -@kwargs_to_strings(p="sequence") -def grdview( +def grdview( # noqa: PLR0913 self, grid: PathLike | xr.DataArray, projection: str | None = None, @@ -41,6 +39,7 @@ def grdview( | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -62,6 +61,7 @@ def grdview( - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -168,6 +168,7 @@ def grdview( R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/histogram.py b/pygmt/src/histogram.py index 03e4966e91a..4b2d026f11f 100644 --- a/pygmt/src/histogram.py +++ b/pygmt/src/histogram.py @@ -32,10 +32,9 @@ h="header", i="incols", l="label", - p="perspective", w="wrap", ) -@kwargs_to_strings(T="sequence", i="sequence_comma", p="sequence") +@kwargs_to_strings(T="sequence", i="sequence_comma") def histogram( self, data: PathLike | TableLike, @@ -46,6 +45,7 @@ def histogram( | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -59,6 +59,7 @@ def histogram( - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -156,6 +157,7 @@ def histogram( R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/image.py b/pygmt/src/image.py index 8580c96426f..24a184812eb 100644 --- a/pygmt/src/image.py +++ b/pygmt/src/image.py @@ -8,13 +8,12 @@ from pygmt._typing import PathLike from pygmt.alias import Alias, AliasSystem from pygmt.clib import Session -from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias +from pygmt.helpers import build_arg_list, fmt_docstring, use_alias from pygmt.params import Box @fmt_docstring -@use_alias(D="position", G="bitcolor", p="perspective") -@kwargs_to_strings(p="sequence") +@use_alias(D="position", G="bitcolor") def image( self, imagefile: PathLike, @@ -26,6 +25,7 @@ def image( | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -53,6 +53,7 @@ def image( - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -99,6 +100,7 @@ def image( R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/legend.py b/pygmt/src/legend.py index 911a26de2ee..82dabc72478 100644 --- a/pygmt/src/legend.py +++ b/pygmt/src/legend.py @@ -15,15 +15,13 @@ data_kind, fmt_docstring, is_nonstr_iter, - kwargs_to_strings, use_alias, ) from pygmt.params import Box @fmt_docstring -@use_alias(D="position", p="perspective") -@kwargs_to_strings(p="sequence") +@use_alias(D="position") def legend( self, spec: PathLike | io.StringIO | None = None, @@ -35,6 +33,7 @@ def legend( | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -54,6 +53,7 @@ def legend( - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -110,6 +110,7 @@ def legend( R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/logo.py b/pygmt/src/logo.py index 82082c45c72..defdc065eb3 100644 --- a/pygmt/src/logo.py +++ b/pygmt/src/logo.py @@ -7,13 +7,12 @@ from pygmt.alias import Alias, AliasSystem from pygmt.clib import Session -from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias +from pygmt.helpers import build_arg_list, fmt_docstring, use_alias from pygmt.params import Box @fmt_docstring @use_alias(D="position") -@kwargs_to_strings(p="sequence") def logo( self, projection: str | None = None, @@ -24,6 +23,7 @@ def logo( | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -43,6 +43,7 @@ def logo( - S = style - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -67,6 +68,7 @@ def logo( {verbose} {panel} {transparency} + {perspective} """ self._activate_figure() @@ -80,6 +82,7 @@ def logo( R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index d7ddf89345b..54fb84cac16 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -15,7 +15,6 @@ build_arg_list, data_kind, fmt_docstring, - kwargs_to_strings, use_alias, ) from pygmt.src._common import _FocalMechanismConvention @@ -125,9 +124,7 @@ def _auto_offset(spec) -> bool: L="outline", T="nodal", W="pen", - p="perspective", ) -@kwargs_to_strings(p="sequence") def meca( # noqa: PLR0913 self, spec: PathLike | TableLike, @@ -148,6 +145,7 @@ def meca( # noqa: PLR0913 | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -209,6 +207,7 @@ def meca( # noqa: PLR0913 - S = scale/convention/component - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -380,6 +379,7 @@ def meca( # noqa: PLR0913 R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/plot.py b/pygmt/src/plot.py index 858a783333b..6fecd648733 100644 --- a/pygmt/src/plot.py +++ b/pygmt/src/plot.py @@ -42,10 +42,9 @@ h="header", i="incols", l="label", - p="perspective", w="wrap", ) -@kwargs_to_strings(i="sequence_comma", p="sequence") +@kwargs_to_strings(i="sequence_comma") def plot( # noqa: PLR0912, PLR0913 self, data: PathLike | TableLike | None = None, @@ -62,6 +61,7 @@ def plot( # noqa: PLR0912, PLR0913 | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | Sequence[float] | bool | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -94,6 +94,7 @@ def plot( # noqa: PLR0912, PLR0913 - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -300,6 +301,7 @@ def plot( # noqa: PLR0912, PLR0913 J=projection, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/plot3d.py b/pygmt/src/plot3d.py index 80f9e5b8e6c..c7c4cad5d74 100644 --- a/pygmt/src/plot3d.py +++ b/pygmt/src/plot3d.py @@ -41,10 +41,9 @@ h="header", i="incols", l="label", - p="perspective", w="wrap", ) -@kwargs_to_strings(i="sequence_comma", p="sequence") +@kwargs_to_strings(i="sequence_comma") def plot3d( # noqa: PLR0912, PLR0913 self, data: PathLike | TableLike | None = None, @@ -64,6 +63,7 @@ def plot3d( # noqa: PLR0912, PLR0913 | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | Sequence[float] | bool | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -98,6 +98,7 @@ def plot3d( # noqa: PLR0912, PLR0913 - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -283,6 +284,7 @@ def plot3d( # noqa: PLR0912, PLR0913 R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/rose.py b/pygmt/src/rose.py index 4f1fca4b343..f2d4810225c 100644 --- a/pygmt/src/rose.py +++ b/pygmt/src/rose.py @@ -33,10 +33,9 @@ e="find", h="header", i="incols", - p="perspective", w="wrap", ) -@kwargs_to_strings(i="sequence_comma", p="sequence") +@kwargs_to_strings(i="sequence_comma") def rose( self, data: PathLike | TableLike | None = None, @@ -48,6 +47,7 @@ def rose( | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): """ @@ -70,6 +70,7 @@ def rose( - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -215,6 +216,7 @@ def rose( R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/solar.py b/pygmt/src/solar.py index dc7fd8e3018..edfd5688d44 100644 --- a/pygmt/src/solar.py +++ b/pygmt/src/solar.py @@ -9,14 +9,12 @@ from pygmt.alias import Alias, AliasSystem from pygmt.clib import Session from pygmt.exceptions import GMTValueError -from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias +from pygmt.helpers import build_arg_list, fmt_docstring __doctest_skip__ = ["solar"] @fmt_docstring -@use_alias(p="perspective") -@kwargs_to_strings(p="sequence") def solar( # noqa: PLR0913 self, terminator: Literal["astronomical", "civil", "day_night", "nautical"] = "day_night", @@ -30,6 +28,7 @@ def solar( # noqa: PLR0913 | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -40,7 +39,11 @@ def solar( # noqa: PLR0913 Full GMT docs at :gmt-docs:`solar.html`. - {aliases} + **Aliases:** + + .. hlist:: + :columns: 3 + - B = frame - G = fill - J = projection @@ -50,6 +53,7 @@ def solar( # noqa: PLR0913 - W = pen - c = panel - t = transparency + - p = perspective Parameters ---------- @@ -146,6 +150,7 @@ def solar( # noqa: PLR0913 R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/ternary.py b/pygmt/src/ternary.py index 92a52f197f2..f9b79c0f2be 100644 --- a/pygmt/src/ternary.py +++ b/pygmt/src/ternary.py @@ -8,20 +8,12 @@ from pygmt._typing import PathLike, TableLike from pygmt.alias import Alias, AliasSystem from pygmt.clib import Session -from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias +from pygmt.helpers import build_arg_list, fmt_docstring, use_alias @fmt_docstring -@use_alias( - C="cmap", - G="fill", - JX="width", - S="style", - W="pen", - p="perspective", -) -@kwargs_to_strings(p="sequence") -def ternary( +@use_alias(C="cmap", G="fill", JX="width", S="style", W="pen") +def ternary( # noqa: PLR0913 self, data: PathLike | TableLike, alabel: str | None = None, @@ -33,6 +25,7 @@ def ternary( | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -54,6 +47,7 @@ def ternary( - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -103,6 +97,7 @@ def ternary( R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/text.py b/pygmt/src/text.py index 817e26e8d9b..900bda554c9 100644 --- a/pygmt/src/text.py +++ b/pygmt/src/text.py @@ -16,7 +16,6 @@ data_kind, fmt_docstring, is_nonstr_iter, - kwargs_to_strings, non_ascii_to_octal, use_alias, ) @@ -33,10 +32,8 @@ f="coltypes", h="header", it="use_word", - p="perspective", w="wrap", ) -@kwargs_to_strings(p="sequence") def text_( # noqa: PLR0912, PLR0913, PLR0915 self, textfiles: PathLike | TableLike | None = None, @@ -55,6 +52,7 @@ def text_( # noqa: PLR0912, PLR0913, PLR0915 | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | Sequence[float] | bool | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -81,6 +79,7 @@ def text_( # noqa: PLR0912, PLR0913, PLR0915 - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -281,6 +280,7 @@ def text_( # noqa: PLR0912, PLR0913, PLR0915 R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/tilemap.py b/pygmt/src/tilemap.py index e6a2ed4c2cb..d1484f7e410 100644 --- a/pygmt/src/tilemap.py +++ b/pygmt/src/tilemap.py @@ -9,7 +9,7 @@ from pygmt.clib import Session from pygmt.datasets.tile_map import load_tile_map from pygmt.enums import GridType -from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias +from pygmt.helpers import build_arg_list, fmt_docstring, use_alias try: from xyzservices import TileProvider @@ -18,8 +18,7 @@ @fmt_docstring -@use_alias(E="dpi", I="shading", Q="nan_transparent", p="perspective") -@kwargs_to_strings(p="sequence") +@use_alias(E="dpi", I="shading", Q="nan_transparent") def tilemap( # noqa: PLR0913 self, region: Sequence[float], @@ -37,6 +36,7 @@ def tilemap( # noqa: PLR0913 | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -59,6 +59,7 @@ def tilemap( # noqa: PLR0913 - N = no_clip - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -138,6 +139,7 @@ def tilemap( # noqa: PLR0913 R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/velo.py b/pygmt/src/velo.py index 3771cff41ae..01adc1b22ab 100644 --- a/pygmt/src/velo.py +++ b/pygmt/src/velo.py @@ -31,9 +31,8 @@ e="find", h="header", i="incols", - p="perspective", ) -@kwargs_to_strings(i="sequence_comma", p="sequence") +@kwargs_to_strings(i="sequence_comma") def velo( self, data: PathLike | TableLike | None = None, @@ -45,6 +44,7 @@ def velo( | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -68,6 +68,7 @@ def velo( - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -274,6 +275,7 @@ def velo( R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs) diff --git a/pygmt/src/wiggle.py b/pygmt/src/wiggle.py index f2bb807187b..ec46f1d0e2d 100644 --- a/pygmt/src/wiggle.py +++ b/pygmt/src/wiggle.py @@ -51,10 +51,9 @@ def _parse_fills(fillpositive, fillnegative): g="gap", h="header", i="incols", - p="perspective", w="wrap", ) -@kwargs_to_strings(i="sequence_comma", p="sequence") +@kwargs_to_strings(i="sequence_comma") def wiggle( # noqa: PLR0913 self, data: PathLike | TableLike | None = None, @@ -70,6 +69,7 @@ def wiggle( # noqa: PLR0913 | bool = False, panel: int | Sequence[int] | bool = False, transparency: float | None = None, + perspective: float | Sequence[float] | str | bool = False, **kwargs, ): r""" @@ -89,6 +89,7 @@ def wiggle( # noqa: PLR0913 - R = region - V = verbose - c = panel + - p = perspective - t = transparency Parameters @@ -147,6 +148,7 @@ def wiggle( # noqa: PLR0913 R=region, V=verbose, c=panel, + p=perspective, t=transparency, ) aliasdict.merge(kwargs)