Skip to content

WIP: DOC/Figure.paragraph: Add a gallery example to show formating long text as paragraphs #4592

Draft
yvonnefroehlich wants to merge 6 commits intomainfrom
add-gallery-paragraph
Draft

WIP: DOC/Figure.paragraph: Add a gallery example to show formating long text as paragraphs #4592
yvonnefroehlich wants to merge 6 commits intomainfrom
add-gallery-paragraph

Conversation

@yvonnefroehlich
Copy link
Copy Markdown
Member

@yvonnefroehlich yvonnefroehlich commented Apr 16, 2026

Description of proposed changes

This PR aims to add a gallery example to show the usage of the newly added high-level method Figure.paragraph.

Currently this is a standalone example. I am a bit wondering if it can make sense to add this to the already existing gallery example Formatting text becauseFigure.paragraph is related to -M of Figure.text.

Please note the upstream bug reported in #4590. I will write a related GMT code example and issue hopefully this night or tomorrow - Edit upstream bug report at GenericMappingTools/gmt#8989.

Preview:

Guidelines

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.19.0 milestone Apr 16, 2026
@yvonnefroehlich yvonnefroehlich self-assigned this Apr 16, 2026
@yvonnefroehlich yvonnefroehlich added the documentation Improvements or additions to documentation label Apr 16, 2026
@yvonnefroehlich yvonnefroehlich marked this pull request as draft April 16, 2026 16:55
@seisman
Copy link
Copy Markdown
Member

seisman commented Apr 17, 2026

I am a bit wondering if it can make sense to add this to the already existing gallery example Formatting text

I think it makes more sense to have a separate example.

becauseFigure.paragraph is related to -M of Figure.text.

I feel these are technical details that users don't have to know, especially for PyGMT users who are not familiar with GMT CLI syntax.

Paragraph
=========

To plot longer text as one or several paragraphs the `pygmt.Figure.paragraph`
Copy link
Copy Markdown
Member

@seisman seisman Apr 21, 2026

Choose a reason for hiding this comment

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

Suggested change
To plot longer text as one or several paragraphs the `pygmt.Figure.paragraph`
To plot longer text as one or several paragraphs the :meth:`pygmt.Figure.paragraph`

Comment on lines +7 to +8
the line length and spacing of the paragraph, respectively.` Two paragraphs are
automatically separated by a blank line.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Better to mention that, multiple paragraphs can be passed in two forms: (1) as a single string separated by a blank line; (2) as a list of strings.

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