From 2263b961a1d46f13c41398bd0c925d4f5d808238 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 16 Jul 2023 22:00:59 +0200 Subject: [PATCH 1/3] Mention GMT docs regarding more complicated legends --- examples/gallery/embellishments/legend.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/gallery/embellishments/legend.py b/examples/gallery/embellishments/legend.py index 3c54e983ed2..cfe37d1d5c3 100644 --- a/examples/gallery/embellishments/legend.py +++ b/examples/gallery/embellishments/legend.py @@ -4,7 +4,12 @@ The :meth:`pygmt.Figure.legend` method can automatically create a legend for symbols plotted using :meth:`pygmt.Figure.plot`. Legend entries are only -created when the ``label`` parameter is used. +created when the ``label`` parameter is used. For more complicated legends, +including legends with multiple columns, users have to write an ASCII file +with instructions for the layout of the items in the legend and pass it +to the `spec` parameter of :meth:`pygmt.Figure.legend`. For details on how +to set up such a file, please see the GMT documentation at +https://docs.generic-mapping-tools.org/latest/legend.html#legend-codes. """ import pygmt From bb2b42366717d54417a5730c43fcb18664fcd9b7 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sun, 16 Jul 2023 22:57:44 +0200 Subject: [PATCH 2/3] Fix higlighting --- examples/gallery/embellishments/legend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gallery/embellishments/legend.py b/examples/gallery/embellishments/legend.py index cfe37d1d5c3..ef677b0ceda 100644 --- a/examples/gallery/embellishments/legend.py +++ b/examples/gallery/embellishments/legend.py @@ -7,8 +7,8 @@ created when the ``label`` parameter is used. For more complicated legends, including legends with multiple columns, users have to write an ASCII file with instructions for the layout of the items in the legend and pass it -to the `spec` parameter of :meth:`pygmt.Figure.legend`. For details on how -to set up such a file, please see the GMT documentation at +to the ``spec`` parameter of :meth:`pygmt.Figure.legend`. For details on +how to set up such a file, please see the GMT documentation at https://docs.generic-mapping-tools.org/latest/legend.html#legend-codes. """ import pygmt From 6af438a5d67d1f75438e277892c56f66c84147c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Mon, 17 Jul 2023 19:42:40 +0200 Subject: [PATCH 3/3] Shorten formulation (code review) Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com> --- examples/gallery/embellishments/legend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gallery/embellishments/legend.py b/examples/gallery/embellishments/legend.py index ef677b0ceda..a4ed8653bc6 100644 --- a/examples/gallery/embellishments/legend.py +++ b/examples/gallery/embellishments/legend.py @@ -6,7 +6,7 @@ symbols plotted using :meth:`pygmt.Figure.plot`. Legend entries are only created when the ``label`` parameter is used. For more complicated legends, including legends with multiple columns, users have to write an ASCII file -with instructions for the layout of the items in the legend and pass it +with instructions for the layout of the legend items and pass it to the ``spec`` parameter of :meth:`pygmt.Figure.legend`. For details on how to set up such a file, please see the GMT documentation at https://docs.generic-mapping-tools.org/latest/legend.html#legend-codes.