Skip to content

DOC: Add gallery example to show text formatting #3987

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

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

yvonnefroehlich
Copy link
Member

@yvonnefroehlich yvonnefroehlich commented Jun 21, 2025

Description of proposed changes

Gallery example related to #3976 for formatting text.

Fixes #3976 (comment)

Preview: https://pygmt-dev--3987.org.readthedocs.build/en/3987/gallery/embellishments/text_formatting.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 wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • 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 command is:

  • /format: automatically format and lint the code

@yvonnefroehlich yvonnefroehlich added this to the 0.17.0 milestone Jun 21, 2025
@yvonnefroehlich yvonnefroehlich self-assigned this Jun 21, 2025
@yvonnefroehlich yvonnefroehlich added the documentation Improvements or additions to documentation label Jun 21, 2025
@yvonnefroehlich yvonnefroehlich marked this pull request as draft June 21, 2025 16:23
fig.text(x=0, y=1, text="E = mc@+2@+")

# Subscripts and Greek letters
fig.text(x=0, y=0, text="@~s@~@-ij@- = c@-ijkl@- @~e@~@-ij@-")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
fig.text(x=0, y=0, text="@~s@~@-ij@- = c@-ijkl@- @~e@~@-ij@-")
fig.text(x=0, y=0, text="@~s@~@-ij@- = c@-ijkl@- @~e@~@-kl@-")

import pygmt

fig = pygmt.Figure()
fig.basemap(region=[-5, 5, -5, 5], projection="X10c", frame=0)
Copy link
Member

Choose a reason for hiding this comment

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

Make it shorter:

Suggested change
fig.basemap(region=[-5, 5, -5, 5], projection="X10c", frame=0)
fig.basemap(region=[-5, 5, -5, 5], projection="X10c/5c", frame=0)

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.

2 participants