You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a gallery example for Figure.legend with StringIO input #3444
perhaps we should have a tutorial for legend rather than a gallery example.
Hm, should such a tutorial focus on creating a legend manually (including the main GMT legend codes) or covering both auto-legends (including the main modifiers that can be appended to the label parameter to adjust the legend) and manual legends (stringIO input, GMT legend codes)? For the later case, would this mean that we remove the current legend example or include it in this new tutorial? Maybe it is still good to have a short example showing how to add a legend in principle.
We should not explain too many details about the legend codes in either a gallery example or a tutorial. These details should be written in the API documentation of Figure.legend.
Hm, should such a tutorial focus on creating a legend manually (including the main GMT legend codes) or covering both auto-legends (including the main modifiers that can be appended to the label parameter to adjust the legend) and manual legends (stringIO input, GMT legend codes)? For the later case, would this mean that we remove the current legend example or include it in this new tutorial? Maybe it is still good to have a short example showing how to add a legend in principle.
I think we have both a tutorial and multiple gallery examples. The tutorial should include topics like:
how to use auto legend
how to add legend manually by giving a legend specification file or a StringIO object
how to specify the legend position on map
how to add the legend box
The gallery example should show what Figure.legendcan do (e.g., two columns legend with lines, symbols, texts, colorbar/scalebar). That's why I think the complicated example in #3438 is qualified as a good gallery example.
Activity
yvonnefroehlich commentedon Sep 20, 2024
The
StringIOinput option is a nice addition to thelegendmethod.Should such a gallery example also explain the (main) GMT legend codes (see https://docs.generic-mapping-tools.org/6.5/legend.html#legend-codes)? I feel, for the mentioned GMT example, some addional comments are needed, as understanding a GMT legend specification file requires some knowledge of the GMT syntax (: .
seisman commentedon Sep 21, 2024
perhaps we should have a tutorial for legend rather than a gallery example.
yvonnefroehlich commentedon Sep 21, 2024
Hm, should such a tutorial focus on creating a legend manually (including the main GMT legend codes) or covering both auto-legends (including the main modifiers that can be appended to the
labelparameter to adjust the legend) and manual legends (stringIO input, GMT legend codes)? For the later case, would this mean that we remove the current legend example or include it in this new tutorial? Maybe it is still good to have a short example showing how to add a legend in principle.seisman commentedon Sep 23, 2024
We should not explain too many details about the legend codes in either a gallery example or a tutorial. These details should be written in the API documentation of
Figure.legend.I think we have both a tutorial and multiple gallery examples. The tutorial should include topics like:
The gallery example should show what
Figure.legendcan do (e.g., two columns legend with lines, symbols, texts, colorbar/scalebar). That's why I think the complicated example in #3438 is qualified as a good gallery example.