Skip to content

Commit 86cf1e2

Browse files
Gallery example "Custom symbols": Mention own coustom symbols (#3186)
Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com>
1 parent bfbe444 commit 86cf1e2

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

examples/gallery/symbols/custom_symbols.py

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,21 @@
22
Custom symbols
33
==============
44
5-
The :meth:`pygmt.Figure.plot` method can plot individual custom symbols
6-
by passing the corresponding symbol name together with the **k** shortcut to
7-
the ``style`` parameter. In total 41 custom symbols are already included of
8-
which the following plot shows five exemplary ones. The symbols are shown
9-
underneath their corresponding names. For the remaining symbols see the GMT
10-
Technical Reference :gmt-docs:`reference/custom-symbols.html`.
5+
The :meth:`pygmt.Figure.plot` method can plot individual custom symbols by
6+
passing the corresponding symbol name together with the **k** shortcut to the
7+
``style`` parameter.
8+
9+
In total 41 custom symbols are already included of which the following plot shows
10+
five exemplary ones. The symbols are shown underneath their corresponding names.
11+
For the remaining symbols see the GMT Technical Reference
12+
:gmt-docs:`reference/custom-symbols.html`.
13+
14+
Beside these built-in custom symbols GMT allows users to define their own custom
15+
symbols. For this, a specific macro language is used. A detailed introduction can
16+
be found at :gmt-docs:`reference/custom-symbols.html#the-macro-language`. After
17+
defining such a symbol it can be used in the same way as a built-in custom symbol.
18+
19+
*Please note*: Custom symbols can not be used in auto-legends yet.
1120
"""
1221

1322
# %%
@@ -16,32 +25,27 @@
1625
fig = pygmt.Figure()
1726
fig.basemap(region=[0, 8, 0, 3], projection="X12c/4c", frame=True)
1827

19-
# define pen and fontstyle for annotations
28+
# Define pen and fontstyle for annotations
2029
pen = "1p,black"
2130
font = "15p,Helvetica-Bold"
2231

23-
# use the volcano symbol with a size of 1.5c,
24-
# fill color is set to "seagreen"
32+
# Use the volcano symbol with a size of 1.5c, fill color is set to "seagreen"
2533
fig.plot(x=1, y=1.25, style="kvolcano/1.5c", pen=pen, fill="seagreen")
2634
fig.text(x=1, y=2.5, text="volcano", font=font)
2735

28-
# use the astroid symbol with a size of 1.5c,
29-
# fill color is set to "red3"
36+
# Use the astroid symbol with a size of 1.5c, fill color is set to "red3"
3037
fig.plot(x=2.5, y=1.25, style="kastroid/1.5c", pen=pen, fill="red3")
3138
fig.text(x=2.5, y=2.5, text="astroid", font=font)
3239

33-
# use the flash symbol with a size of 1.5c,
34-
# fill color is set to "darkorange"
40+
# Use the flash symbol with a size of 1.5c, fill color is set to "darkorange"
3541
fig.plot(x=4, y=1.25, style="kflash/1.5c", pen=pen, fill="darkorange")
3642
fig.text(x=4, y=2.5, text="flash", font=font)
3743

38-
# use the star4 symbol with a size of 1.5c,
39-
# fill color is set to "dodgerblue4"
44+
# Use the star4 symbol with a size of 1.5c, fill color is set to "dodgerblue4"
4045
fig.plot(x=5.5, y=1.25, style="kstar4/1.5c", pen=pen, fill="dodgerblue4")
4146
fig.text(x=5.5, y=2.5, text="star4", font=font)
4247

43-
# use the hurricane symbol with a size of 1.5c,
44-
# fill color is set to "magenta4"
48+
# Use the hurricane symbol with a size of 1.5c, fill color is set to "magenta4"
4549
fig.plot(x=7, y=1.25, style="khurricane/1.5c", pen=pen, fill="magenta4")
4650
fig.text(x=7, y=2.5, text="hurricane", font=font)
4751

0 commit comments

Comments
 (0)