Closed
Description
We already use the auto-legend feature in some tutorials/gallery examples, but we don't have an example for how to manually specify the legend specification. This gallery example (https://www.pygmt.org/dev/gallery/embellishments/legend.html) provides a link to the GMT official documentation and mentions that Figure.legend
can accept a legend specification file without details.
After #3438 is merged, it would be possible to store the legend specification in a StringIO object, so an example would be good.
I think we can add the GMT official example at https://docs.generic-mapping-tools.org/6.5/legend.html#examples as a PyGMT gallery example, similar to the test in #3438.