pygmt.params.Perspective
- class pygmt.params.Perspective(azimuth=None, elevation=None, level=None, plane=None, refpoint=None, cstype='mapcoords')[source]
Class for setting perspective view.
Examples
>>> import pygmt >>> from pygmt.params import Axis, Frame, Perspective >>> fig = pygmt.Figure() >>> fig.basemap( ... region=[0, 10, 0, 10, 0, 20], ... projection="X3c", ... zsize="3c", ... frame=Frame(axes="WSenZ", title="Perspective View", axis=Axis(grid=True)), ... perspective=Perspective(azimuth=135, elevation=40, level=10), ... ) >>> fig.show()
- azimuth: float | None = None
Azimuth angle of the viewpoint in degrees. Default is 180.0, i.e., looking from south to north.
- elevation: float | None = None
Elevation angle of the viewpoint in degrees above the horizon. Default is 90.0, i.e., looking straight down at nadir.
- level: float | None = None
The level at which all 2-D elements, (e.g., the plot frame), are drawn. Only valid when used together with parameters
zsizeorzscale. Default is at the bottom of the selected axis.
- plane: Literal['x', 'y', 'z'] | None = None
Set which constant-coordinate plane is used as the plotting plane. Use
"x","y", or"z"for the x-plane, y-plane, or horizontal z-plane, respectively [Default is"z"].
- refpoint: Sequence[float | str] | None = None
Reference point for the perspective view. By default, the view rotates about the plotting origin. Use
refpointandcstypeto rotate about a different point instead. The format ofrefpointdepends on the value ofcstype:cstype="mapcoords": (longitude, latitude) or (longitude, latitude, z)cstype="plotcoords": (x, y)