Tutorial "Plotting text": Rewrite to improve structure, explain more parameters, show list input#2760
Tutorial "Plotting text": Rewrite to improve structure, explain more parameters, show list input#2760
Conversation
|
Sorry to be mean here, but I think the "Plotting text" tutorial (both the old version and the current new version) is not as good as other tutorials. In other tutorials, we usually start with a simple plot with a few required parameters and then improve the plot by adding more parameters step by step in the following sections, but in this tutorial, we start with a nice map and then start to explain the Here are my thoughts about the tutorial:
|
No worries @seisman. My initial intent for this PR was only to add a code example regarding list input for |
|
I tried to address the issues mentioned by @seisman in #2760 (comment). @GenericMappingTools/pygmt-maintainers do you think the current changes are improving this tutorial? |
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Description of proposed changes
This PR aims to expand and update the tutorial "Plotting text":
positionparameter along withjustifypenparameter along withfilljustify,font,angle,fill+penvia simple Cartesian plotsjustify,font, andangle(possible after PR Figure.text: Support passing in a list of angle/font/justify values #2720) beside providing an external input filePlease state, whether these changes are improvements, or that we should keep the current version.
Changes suggested by @seisman to improve the structure of the tutorial (see comment #2760 (comment)):
text="SOUTH CHINA SEA", x=112, y=6)angle/font/justify/pen/fillparameters to adjust the texts (maybe one map forangle/font/justifyand another map forpen/fillFigure.textcall (e.g., pass 1-D arrays tox/y/text)angle/font/justifycan also accept 1-D arrays (maybe combine 3 and 4 into one map)datatextfilespositionparameter. A useful use case for this parameter is to add a tag (e.g.,(a)) at the top left corner of the map for multiple subplots, but we should also mention that theFigure.subplotmethod can do this automatically.Preview: https://pygmt-dev--2760.org.readthedocs.build/en/2760/tutorials/basics/text.html
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version