-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: Add advanced tutorial "Creating legends" #3594
base: main
Are you sure you want to change the base?
Conversation
# The following example is orientated on the related GMT example at | ||
# :gmt-docs:`legend.html#examples`, but modified to use an :class:`io.StringIO` object. | ||
# | ||
# We start with setting up the :class:`io.StringIO` object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit unsure how detailed we want to explain the syntax of the legend specification here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should explain the details here. We should refer users to read the GMT legend manual, or if we really want to explain it, it should be in the Technical Referecence, rather than in a tutorial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, I also do not think it's good to have the details explained here; having this listed in the Technical Reference is a good point!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me except one minor edit.
Co-authored-by: Dongdong Tian <[email protected]>
Description of proposed changes
This PR addes the advanced tutorial "Creating legends":
label
parameter of plotting methodsposition
parameter, +w, +o, +jspec
parameter,io.StringIO
objectFixes #3444
Preview: https://pygmt-dev--3594.org.readthedocs.build/en/3594/tutorials/advanced/legends.html
Reminders
make format
andmake check
to 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 command is:
/format
: automatically format and lint the code