Skip to content

Figure.text: Fix warning for font parameter#4576

Closed
yvonnefroehlich wants to merge 1 commit intomainfrom
fix-text-font
Closed

Figure.text: Fix warning for font parameter#4576
yvonnefroehlich wants to merge 1 commit intomainfrom
fix-text-font

Conversation

@yvonnefroehlich
Copy link
Copy Markdown
Member

@yvonnefroehlich yvonnefroehlich commented Apr 11, 2026

Description of proposed changes

I am wondering about the context of the type bool for the angle and font parameters of Figure.text.

    angle: float | Sequence[float] | bool = False,
    font: str | StringArrayTypes | bool = False,

Why was there a change from None to False in PR #4489? I believe this causes the newly occuring warning by the Figure.text method, e.g., https://www.pygmt.org/dev/tutorials/basics/text.html:

text [WARNING]: Length <unit> e not supported - revert to default unit [point]
text [WARNING]: Fals not a valid number and may not be decoded properly.
text [WARNING]: Representation of font size not recognized. Using default.

When changing back to None the warning does no longer occur.

Preview: https://pygmt-dev--4576.org.readthedocs.build/en/4576/gallery/embellishments/text_formatting.html

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 11, 2026
@yvonnefroehlich yvonnefroehlich self-assigned this Apr 11, 2026
@yvonnefroehlich yvonnefroehlich added documentation Improvements or additions to documentation maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog and removed documentation Improvements or additions to documentation labels Apr 11, 2026
@yvonnefroehlich
Copy link
Copy Markdown
Member Author

yvonnefroehlich commented Apr 11, 2026

Superseded by PR #4577.

@seisman seisman deleted the fix-text-font branch April 11, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant