Figure.legend: Fix incorrect docstrings#4753
Conversation
| width. If height is given as percentage then height is recomputed as that | ||
| fraction of the legend width (not plot height). | ||
| **Note:** Currently, the automatic height calculation only works when legend |
There was a problem hiding this comment.
Here is what the GMT documentation says (https://docs.generic-mapping-tools.org/dev/legend.html):
If +w is not given then we compute the width within the Postscript code. Currently, this is only possible if just legend codes D, H, L, S, or V are used and that the number of symbol columns (N) is 1. If height is zero or not given then we estimate height based the expected vertical extent of the items to be placed.
| # :meth:`pygmt.Figure.vlines` as well as :meth:`pygmt.Figure.histogram`. Therefore the | ||
| # ``label`` parameter has to be specified to state the desired text for the legend entry | ||
| # (white spaces are supported). Here, we use :meth:`pygmt.Figure.plot`, exemplary. By | ||
| # default, the legend is placed in the Upper Right corner with an offset of 0.1 |
There was a problem hiding this comment.
The default offset is 0.2 c not 0.1 cm. I feel it's better not to mention such details in a tutorial.
There was a problem hiding this comment.
Yes, as the defaults may change over time, and we often miss to update all occurrences, especially in the examples.
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
No description provided.