Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update text symbol gallery example #1648

Merged
merged 9 commits into from
Dec 10, 2021
Merged
Changes from 7 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
13 changes: 7 additions & 6 deletions examples/gallery/symbols/text_symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
different characters) and *string* can be a letter or a text string
(less than 256 characters). Optionally, you can append **+f**\ *font* to
select a particular font [Default is :gmt-term:`FONT_ANNOT_PRIMARY`] as well as
**+j**\ *justify* to change the justification [Default is CM]. Outline
and fill color of the text symbols can be customized via the ``pen``
and ``color`` parameters, respectively.

**+j**\ *justify* to change the justification [Default is CM]. The outline
color of the text symbols can be defined via the ``style`` parameter [Default
is black], the fill color can be set with the ``color`` parameter, and the
michaelgrund marked this conversation as resolved.
Show resolved Hide resolved
outline width can be customized with the ``pen`` parameter.
For all supported octal codes and fonts see the GMT cookbook
:gmt-docs:`cookbook/octal-codes.html` and
:gmt-docs:`cookbook/postscript-fonts.html`.
Expand All @@ -37,7 +37,8 @@
# color fill is set to "gold"
fig.plot(x=5.5, y=1.5, style="l3.5c+ts+fTimes-Italic", color="gold", pen=pen)
# plot the pi symbol (\160 is octal code for pi) of size 3.5c, for this use
# the "Symbol" font, color fill is set to "magenta4"
fig.plot(x=7, y=1.5, style="l3.5c+t\160+fSymbol", color="magenta4", pen=pen)
# the "Symbol" font, the outline color of the symbol is set to
# "darkorange", the color fill is set to "magenta4"
fig.plot(x=7, y=1.5, style="l3.5c+t\160+fSymbol,darkorange", color="magenta4", pen=pen)

fig.show()