Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ All plotting is handled through the :class:`pygmt.Figure` class and its methods.

Figure

Plotting map elements
~~~~~~~~~~~~~~~~~~~~~
Plotting embellishments
~~~~~~~~~~~~~~~~~~~~~~~

.. autosummary::
:toctree: generated
Expand Down
2 changes: 1 addition & 1 deletion examples/gallery/3d_plots/scatter3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
fill=df.species.cat.codes.astype(int),
# Use colormap created by makecpt
cmap=True,
# Set map dimensions (xmin, xmax, ymin, ymax, zmin, zmax)
# Set plot dimensions (xmin, xmax, ymin, ymax, zmin, zmax)
region=region,
# Set frame parameters
frame=[
Expand Down
6 changes: 3 additions & 3 deletions examples/intro/03_figure_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- :meth:`pygmt.Figure()`: having a number of plotting methods. Every new
figure must start with the creation of a :meth:`pygmt.Figure()` instance
- ``frame``: setting plot or map boundaries (a combination of the single
- ``frame``: setting plot boundaries (a combination of the single
letters of **WSNE**, **wsne**, or **lbtr**), adding annotations, ticks,
gridlines (**afg**), axis labels (**+l**), and title (**+t**), e.g.,
in :meth:`pygmt.Figure.basemap`. Detailed examples can be found at
Expand Down Expand Up @@ -68,9 +68,9 @@
fig.plot(x=2, y=15, style="c0.5c", pen="2p,darkblue")
fig.text(x=2, y=17, text="Grid", **mainexplain)
fig.text(x=2.4, y=18, text='frame=["xg2", "yg5"]', **minorexplain)
# ============ Map Boundaries
# ============ Plot Boundaries
fig.plot(x=10, y=9, style="c0.5c", pen="2p,darkblue", no_clip=True)
fig.text(x=11.5, y=8, text="Map Boundary", **mainexplain)
fig.text(x=11.5, y=8, text="Plot Boundary", **mainexplain)
fig.text(x=11.5, y=6.8, text='frame="WStr"', **minorexplain)
# ============ fig.plot (style)
fig.plot(x=6, y=8, style="c0.7c", pen="2p,darkblue")
Expand Down
24 changes: 12 additions & 12 deletions examples/projections/nongeo/polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
# ============
# Top left
fig.basemap(
# Set map limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1
# Set plot limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1
region=[0, 360, 0, 1],
# Set map width to 5 cm
# Set plot width to 5 cm
projection="P5c",
# Set the frame and title; @^ allows for a line break within the title
frame=["xa45f", "+gbisque+tprojection='P5c' @^ region=[0, 360, 0, 1]"],
Expand All @@ -69,9 +69,9 @@
# ============
# Top middle
fig.basemap(
# Set map limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1
# Set plot limits to theta_min = 0, theta_max = 360, radius_min = 0, radius_max = 1
region=[0, 360, 0, 1],
# Set map width to 5 cm and interpret input data as geographic azimuth instead of
# Set plot width to 5 cm and interpret input data as geographic azimuth instead of
# standard angle
projection="P5c+a",
# Set the frame and title; @^ allows for a line break within the title
Expand All @@ -83,9 +83,9 @@
# ============
# Top right
fig.basemap(
# Set map limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1
# Set plot limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1
region=[0, 90, 0, 1],
# Set map width to 5 cm and interpret input data as geographic azimuth instead of
# Set plot width to 5 cm and interpret input data as geographic azimuth instead of
# standard angle
projection="P5c+a",
# Set the frame and title; @^ allows for a line break within the title
Expand All @@ -97,9 +97,9 @@
# ============
# Bottom left
fig.basemap(
# Set map limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1
# Set plot limits to theta_min = 0, theta_max = 90, radius_min = 0, radius_max = 1
region=[0, 90, 0, 1],
# Set map width to 5 cm and interpret input data as geographic azimuth instead of
# Set plot width to 5 cm and interpret input data as geographic azimuth instead of
# standard angle, rotate coordinate system counterclockwise by 45 degrees
projection="P5c+a+t45",
# Set the frame and title; @^ allows for a line break within the title
Expand All @@ -115,10 +115,10 @@
# ============
# Bottom middle
fig.basemap(
# Set map limits to theta_min = 0, theta_max = 90, radius_min = 3480,
# Set plot limits to theta_min = 0, theta_max = 90, radius_min = 3480,
# radius_max = 6371 (Earth's radius)
region=[0, 90, 3480, 6371],
# Set map width to 5 cm and interpret input data as geographic azimuth instead of
# Set plot width to 5 cm and interpret input data as geographic azimuth instead of
# standard angle, rotate coordinate system counterclockwise by 45 degrees
projection="P5c+a+t45",
# Set the frame, and title; @^ allows for a line break within the title
Expand All @@ -134,10 +134,10 @@
# ============
# Bottom right
fig.basemap(
# Set map limits to theta_min = 0, theta_max = 90, radius_min = 3480,
# Set plot limits to theta_min = 0, theta_max = 90, radius_min = 3480,
# radius_max = 6371 (Earth's radius)
region=[0, 90, 3480, 6371],
# Set map width to 5 cm and interpret input data as geographic azimuth instead of
# Set plot width to 5 cm and interpret input data as geographic azimuth instead of
# standard angle, rotate coordinate system counterclockwise by 45 degrees, r-axis
# is marked as depth
projection="P5c+a+t45+z",
Expand Down
4 changes: 2 additions & 2 deletions examples/tutorials/advanced/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
#
# The ``MAP_FRAME_TYPE`` parameter specifies the style of map frame to use, of which
# there are 5 options: ``fancy`` (default, see above), ``fancy+``, ``plain``, ``graph``
# (which does not apply to geographical maps) and ``inside``.
# (which does not apply to geographic maps) and ``inside``.
#
# The ``FORMAT_GEO_MAP`` parameter controls the format of geographical tick annotations.
# The ``FORMAT_GEO_MAP`` parameter controls the format of geographic tick annotations.
# The default uses degrees and minutes. Here we specify the ticks to be a decimal number
# of degrees.

Expand Down
8 changes: 4 additions & 4 deletions examples/tutorials/basics/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Plotting text
=============

It is often useful to add text annotations to a plot or map. This is handled by the
It is often useful to add text annotations to a plot. This is handled by the
:meth:`pygmt.Figure.text` method of the :class:`pygmt.Figure` class.
"""

Expand Down Expand Up @@ -189,7 +189,7 @@
# specified to set the reference point for the text on the plot. As for the ``justify``
# parameter, the ``position`` parameter is specified by a
# :doc:`2-character justification code </techref/justification_codes>`.
# This can be helpful to add a tag to a subplot or text labels out of the plot or map
# This can be helpful to add a tag to a subplot or text labels out of the plot
# frame, e.g., for depth slices.

fig = pygmt.Figure()
Expand All @@ -208,15 +208,15 @@
fig.shift_origin(xshift="w+1c")

# -----------------------------------------------------------------------------
# Right: Add a text label outside of the plot or map frame
# Right: Add a text label outside of the plot frame
fig.basemap(region=[-30, 30, 10, 60], projection="L0/35/23/47/5c", frame=["wSnE", "af"])

fig.text(
text="@@100 km", # "@@" gives "@" in GMT or PyGMT
position="TC", # Top Center
justify="MC", # Middle Center
offset="0c/0.2c",
no_clip=True, # Allow plotting outside of the map or plot frame
no_clip=True, # Allow plotting outside of the plot frame
)

fig.show()
Expand Down
4 changes: 2 additions & 2 deletions pygmt/helpers/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
matching. This does not apply to headers or segment headers.""",
"frame": r"""
frame : bool, str, or list
Set map boundary
Set plot boundary
:doc:`frame and axes attributes </tutorials/basics/frames>`.""",
"gap": r"""
gap : str or list
Expand Down Expand Up @@ -277,7 +277,7 @@
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.
- *zlevel*: Z-level at which 2-D elements (e.g., the plot frame) are drawn.
Only applied when used together with ``zsize`` or ``zscale``. [Default is
at the bottom of the z-axis].

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def contour( # noqa: PLR0913
Contour table data by direct triangulation.

Takes a matrix, (x, y, z) triplets, or a file name as input and plots,
lines, polygons, or symbols at those locations on a map.
lines, polygons, or symbols at those locations on a plot.

Must provide either ``data`` or ``x``, ``y``, and ``z``.

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def grdimage( # noqa: PLR0913
value. Interpolation and aliasing is controlled with the
``interpolation`` parameter.

The ``region`` parameter can be used to select a map region larger or
The ``region`` parameter can be used to select a plot region larger or
smaller than that implied by the extent of the grid.

Full GMT docs at :gmt-docs:`grdimage.html`.
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def image( # noqa: PLR0913
r"""
Plot raster or EPS images.

Reads an Encapsulated PostScript file or a raster image file and plot it on a map.
Reads an Encapsulated PostScript file or a raster image file and plot it on a plot.
The image can be scaled arbitrarily, and 1-bit raster images can be:

- inverted, i.e., black pixels (on) become white (off) and vice versa.
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def plot( # noqa: PLR0912, PLR0913
[Default plots points whose coordinates are strictly inside the
frame boundaries only].
The parameter does not apply to lines and polygons which are always
clipped to the map region. For periodic (360-longitude) maps we
clipped to the plot region. For periodic (360-longitude) maps we
must plot all symbols twice in case they are clipped by the
repeating boundary. ``no_clip=True`` will turn off clipping and not
plot repeating symbols. Use ``no_clip="r"`` to turn off clipping
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/plot3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def plot3d( # noqa: PLR0912, PLR0913
[Default plots points whose coordinates are strictly inside the
frame boundaries only].
This parameter does not apply to lines and polygons which are always
clipped to the map region. For periodic (360° longitude) maps we
clipped to the plot region. For periodic (360° longitude) maps we
must plot all symbols twice in case they are clipped by the
repeating boundary. ``no_clip=True`` will turn off clipping and not
plot repeating symbols. Use ``no_clip="r"`` to turn off clipping
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/rose.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def rose( # noqa: PLR0913
to 1.

frame : str
Set map boundary frame and axes attributes. Remember that *x*
Set plot boundary frame and axes attributes. Remember that *x*
here is radial distance and *y* is azimuth. The y label may be
used to plot a figure caption. The scale bar length is determined
by the radial gridline spacing.
Expand Down
4 changes: 2 additions & 2 deletions pygmt/src/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ def text_( # noqa: PLR0912, PLR0913
The x and y coordinates, or an array of x and y coordinates to plot
the text.
position
Set reference point on the map for the text by using x, y
Set reference point on the plot for the text by using x, y
coordinates extracted from ``region`` instead of providing them
through ``x``/``y``. Specify with a
:doc:`2-character justification code </techref/justification_codes>`.
For example, ``position="TL"`` plots the text at the Top Left corner
of the map.
of the plot.
text
The text string, or an array of strings to plot on the figure.
angle: float, str, bool or list
Expand Down