Skip to content
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

Add a gallery example showing the usage of text symbols #1522

Merged
merged 15 commits into from
Sep 22, 2021

Conversation

michaelgrund
Copy link
Member

@michaelgrund michaelgrund commented Sep 18, 2021

Description of proposed changes

This PR adds a gallery example that shows the usage of text symbols via Figure.plot().

Text symbols gallery example

Preview at https://pygmt-git-gallery-text-symbols-gmt.vercel.app/gallery/symbols/text_symbols.html

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

This PR adds adds a gallery example that shows the usage of text symbols via ``Figure.plot()``
@michaelgrund michaelgrund added the documentation Improvements or additions to documentation label Sep 18, 2021
@michaelgrund michaelgrund added this to the 0.5.0 milestone Sep 18, 2021
@michaelgrund michaelgrund self-assigned this Sep 18, 2021
@michaelgrund michaelgrund marked this pull request as draft September 18, 2021 15:41
@michaelgrund michaelgrund marked this pull request as ready for review September 18, 2021 17:25
@seisman
Copy link
Member

seisman commented Sep 19, 2021

Is "text symbols" different from normal texts? Why not using the Figure.text()?

@michaelgrund
Copy link
Member Author

michaelgrund commented Sep 19, 2021

Is "text symbols" different from normal texts? Why not using the Figure.text()?

I expanded the docstring and added a further sentence that is used in the GMT docs explaining why to use text symbols. In my opinion we should at least mention that it's possible to plot text symbols also via Figure.plot() not only using Figure.text().

Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example looks good to me except a few suggestions.

examples/gallery/symbols/text_symbols.py Outdated Show resolved Hide resolved
examples/gallery/symbols/text_symbols.py Outdated Show resolved Hide resolved
examples/gallery/symbols/text_symbols.py Outdated Show resolved Hide resolved
@seisman seisman added the final review call This PR requires final review and approval from a second reviewer label Sep 20, 2021
Copy link
Member

@weiji14 weiji14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had an idea to spell out 'πgmt', but ok with this example too 😆

@michaelgrund
Copy link
Member Author

Had an idea to spell out 'πgmt', but ok with this example too 😆

Nice idea but I think it's not possible to mix Symbols and standard text here.

@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Sep 22, 2021
@seisman seisman merged commit 711fc10 into main Sep 22, 2021
@seisman seisman deleted the gallery-text-symbols branch September 22, 2021 08:48
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants