Skip to content

Commit

Permalink
Rewrap
Browse files Browse the repository at this point in the history
  • Loading branch information
yvonnefroehlich committed Feb 10, 2025
1 parent 31273a6 commit 4fcfd53
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions examples/tutorials/advanced/legends.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@
# ---------------------
#
# An auto-legend can be created for the methods :meth:`pygmt.Figure.plot` and
# :meth:`pygmt.Figure.plot3d`, :meth:`pygmt.Figure.hline` and
# :meth:`pygmt.Figure.vline` as well as :meth:`pygmt.Figure.histogram`. Therefore the
# ``label`` parameter has to be specified to state the desired text for the legend entry
# (white spaces are supported). Here, we use :meth:`pygmt.Figure.plot`, exemplary. By
# default, the legend is placed in the Upper Right corner with an offset of 0.1
# centimeters in both x and y directions, and surrounded by a box with a white fill and
# a 1-point thick, black, solid outline. The order of the legend entries (top to bottom)
# is determine by the plotting order. Optionally, to adjust the legend, append different
# modifiers to the string passed to ``label``. For a list of available modifiers see
# :gmt-docs:`gmt.html#l-full`. To create a
# :doc:`multiple-column legend </gallery/embellishments/legend>` **+N** is used with
# the desired number of columns.
# :meth:`pygmt.Figure.plot3d`, :meth:`pygmt.Figure.hline` and :meth:`pygmt.Figure.vline`
# as well as :meth:`pygmt.Figure.histogram`. Therefore the ``label`` parameter has to
# be specified to state the desired text for the legend entry (white spaces are
# supported). Here, we use :meth:`pygmt.Figure.plot`, exemplary. By default, the legend
# is placed in the Upper Right corner with an offset of 0.1 centimeters in both x and y
# directions, and surrounded by a box with a white fill and a 1-point thick, black,
# solid outline. The order of the legend entries (top to bottom) is determine by the
# plotting order. Optionally, to adjust the legend, append different modifiers to the
# string passed to ``label``. For a list of available modifiers see
# :gmt-docs:`gmt.html#l-full`. To create a :doc:`multiple-column legend
# </gallery/embellishments/legend>` **+N** is used with the desired number of columns.

fig = pygmt.Figure()
fig.basemap(region=[-5, 5, -5, 5], projection="X5c", frame=True)
Expand Down

0 comments on commit 4fcfd53

Please sign in to comment.