From 70508829114056bc0180b7064d305589712aad65 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Apr 2024 12:00:25 +0200 Subject: [PATCH 1/5] Add comment regarding own custom symbols --- examples/gallery/symbols/custom_symbols.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/examples/gallery/symbols/custom_symbols.py b/examples/gallery/symbols/custom_symbols.py index 3949903f8e2..1b3e7b7b028 100644 --- a/examples/gallery/symbols/custom_symbols.py +++ b/examples/gallery/symbols/custom_symbols.py @@ -4,10 +4,21 @@ The :meth:`pygmt.Figure.plot` method can plot individual custom symbols by passing the corresponding symbol name together with the **k** shortcut to -the ``style`` parameter. In total 41 custom symbols are already included of -which the following plot shows five exemplary ones. The symbols are shown -underneath their corresponding names. For the remaining symbols see the GMT -Technical Reference :gmt-docs:`reference/custom-symbols.html`. +the ``style`` parameter. + +In total 41 custom symbols are already included of which the following plot +shows five exemplary ones. The symbols are shown underneath their +corresponding names. For the remaining symbols see the GMT Technical +Reference :gmt-docs:`reference/custom-symbols.html`. + +Beside these built-in custom symbols GMT allows users to define their own +custom symbols. For this a specific macro language is used. An detailed +introduction can be found at +https://docs.generic-mapping-tools.org/6.5/reference/custom-symbols.html#the-macro-language. +After defining such a symbol it can be used in the same way as a built-in +custom symbol. + +*Please note*: Custom symbols can not be used in auto-legends yet. """ # %% From 208b8d62932c6b13cb48dd1b75809e6876e3184d Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Apr 2024 12:47:19 +0200 Subject: [PATCH 2/5] Improve link setting --- examples/gallery/symbols/custom_symbols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/symbols/custom_symbols.py b/examples/gallery/symbols/custom_symbols.py index 1b3e7b7b028..6b8802708a1 100644 --- a/examples/gallery/symbols/custom_symbols.py +++ b/examples/gallery/symbols/custom_symbols.py @@ -14,7 +14,7 @@ Beside these built-in custom symbols GMT allows users to define their own custom symbols. For this a specific macro language is used. An detailed introduction can be found at -https://docs.generic-mapping-tools.org/6.5/reference/custom-symbols.html#the-macro-language. +:gmt-docs:`reference/custom-symbols.html#the-macro-language` After defining such a symbol it can be used in the same way as a built-in custom symbol. From 3638881fc34bfe785df0921e201cbb93a470e07d Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Apr 2024 14:33:34 +0200 Subject: [PATCH 3/5] Use complete allowed line length --- examples/gallery/symbols/custom_symbols.py | 38 +++++++++------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/examples/gallery/symbols/custom_symbols.py b/examples/gallery/symbols/custom_symbols.py index 6b8802708a1..e549ea506f0 100644 --- a/examples/gallery/symbols/custom_symbols.py +++ b/examples/gallery/symbols/custom_symbols.py @@ -2,21 +2,20 @@ Custom symbols ============== -The :meth:`pygmt.Figure.plot` method can plot individual custom symbols -by passing the corresponding symbol name together with the **k** shortcut to -the ``style`` parameter. +The :meth:`pygmt.Figure.plot` method can plot individual custom symbols by +passing the corresponding symbol name together with the **k** shortcut to the +``style`` parameter. In total 41 custom symbols are already included of which the following plot -shows five exemplary ones. The symbols are shown underneath their -corresponding names. For the remaining symbols see the GMT Technical -Reference :gmt-docs:`reference/custom-symbols.html`. +shows five exemplary ones. The symbols are shown underneath their corresponding +names. For the remaining symbols see the GMT Technical Reference +:gmt-docs:`reference/custom-symbols.html`. -Beside these built-in custom symbols GMT allows users to define their own -custom symbols. For this a specific macro language is used. An detailed +Beside these built-in custom symbols GMT allows users to define their own custom +symbols. For this a specific macro language is used. A detailed introduction can be found at -:gmt-docs:`reference/custom-symbols.html#the-macro-language` -After defining such a symbol it can be used in the same way as a built-in -custom symbol. +:gmt-docs:`reference/custom-symbols.html#the-macro-language`. After defining such +a symbol it can be used in the same way as a built-in custom symbol. *Please note*: Custom symbols can not be used in auto-legends yet. """ @@ -27,32 +26,27 @@ fig = pygmt.Figure() fig.basemap(region=[0, 8, 0, 3], projection="X12c/4c", frame=True) -# define pen and fontstyle for annotations +# Define pen and fontstyle for annotations pen = "1p,black" font = "15p,Helvetica-Bold" -# use the volcano symbol with a size of 1.5c, -# fill color is set to "seagreen" +# Use the volcano symbol with a size of 1.5c, fill color is set to "seagreen" fig.plot(x=1, y=1.25, style="kvolcano/1.5c", pen=pen, fill="seagreen") fig.text(x=1, y=2.5, text="volcano", font=font) -# use the astroid symbol with a size of 1.5c, -# fill color is set to "red3" +# Use the astroid symbol with a size of 1.5c, fill color is set to "red3" fig.plot(x=2.5, y=1.25, style="kastroid/1.5c", pen=pen, fill="red3") fig.text(x=2.5, y=2.5, text="astroid", font=font) -# use the flash symbol with a size of 1.5c, -# fill color is set to "darkorange" +# Use the flash symbol with a size of 1.5c, fill color is set to "darkorange" fig.plot(x=4, y=1.25, style="kflash/1.5c", pen=pen, fill="darkorange") fig.text(x=4, y=2.5, text="flash", font=font) -# use the star4 symbol with a size of 1.5c, -# fill color is set to "dodgerblue4" +# Use the star4 symbol with a size of 1.5c, fill color is set to "dodgerblue4" fig.plot(x=5.5, y=1.25, style="kstar4/1.5c", pen=pen, fill="dodgerblue4") fig.text(x=5.5, y=2.5, text="star4", font=font) -# use the hurricane symbol with a size of 1.5c, -# fill color is set to "magenta4" +# Use the hurricane symbol with a size of 1.5c, fill color is set to "magenta4" fig.plot(x=7, y=1.25, style="khurricane/1.5c", pen=pen, fill="magenta4") fig.text(x=7, y=2.5, text="hurricane", font=font) From 336c1e2167281d6ce1b87c18322d1ae0b89fa878 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Apr 2024 14:58:07 +0200 Subject: [PATCH 4/5] Use complete allowed line length --- examples/gallery/symbols/custom_symbols.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/gallery/symbols/custom_symbols.py b/examples/gallery/symbols/custom_symbols.py index e549ea506f0..578bae1bf83 100644 --- a/examples/gallery/symbols/custom_symbols.py +++ b/examples/gallery/symbols/custom_symbols.py @@ -6,16 +6,15 @@ passing the corresponding symbol name together with the **k** shortcut to the ``style`` parameter. -In total 41 custom symbols are already included of which the following plot -shows five exemplary ones. The symbols are shown underneath their corresponding -names. For the remaining symbols see the GMT Technical Reference +In total 41 custom symbols are already included of which the following plot shows +five exemplary ones. The symbols are shown underneath their corresponding names. +For the remaining symbols see the GMT Technical Reference :gmt-docs:`reference/custom-symbols.html`. Beside these built-in custom symbols GMT allows users to define their own custom -symbols. For this a specific macro language is used. A detailed -introduction can be found at -:gmt-docs:`reference/custom-symbols.html#the-macro-language`. After defining such -a symbol it can be used in the same way as a built-in custom symbol. +symbols. For this a specific macro language is used. A detailed introduction can +be found at :gmt-docs:`reference/custom-symbols.html#the-macro-language`. After +defining such a symbol it can be used in the same way as a built-in custom symbol. *Please note*: Custom symbols can not be used in auto-legends yet. """ From 2e0472e67be8a7e947f1e907fa7ca89128f24ce1 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 21 Apr 2024 15:18:46 +0200 Subject: [PATCH 5/5] Add comma Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com> --- examples/gallery/symbols/custom_symbols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/symbols/custom_symbols.py b/examples/gallery/symbols/custom_symbols.py index 578bae1bf83..5e2b5a001b2 100644 --- a/examples/gallery/symbols/custom_symbols.py +++ b/examples/gallery/symbols/custom_symbols.py @@ -12,7 +12,7 @@ :gmt-docs:`reference/custom-symbols.html`. Beside these built-in custom symbols GMT allows users to define their own custom -symbols. For this a specific macro language is used. A detailed introduction can +symbols. For this, a specific macro language is used. A detailed introduction can be found at :gmt-docs:`reference/custom-symbols.html#the-macro-language`. After defining such a symbol it can be used in the same way as a built-in custom symbol.