Skip to content

Add rc default for text borderstyle - #549

Merged
cvanelteren merged 3 commits into
mainfrom
feat/text-borderstyle-rc
Feb 4, 2026
Merged

Add rc default for text borderstyle#549
cvanelteren merged 3 commits into
mainfrom
feat/text-borderstyle-rc

Conversation

@cvanelteren

@cvanelteren cvanelteren commented Feb 3, 2026

Copy link
Copy Markdown
Collaborator

By defualt matplotlib uses miter for borderstyle on text, this makes the annotated text look jagged. It would look nicer if this was beveled. Proposal to move to beveled by default and add an rc parameter to config this.

  • add rc param text.borderstyle with validation and default miter
  • wire Axes.text/label updates to respect rc default while keeping explicit overrides
  • add tests covering rc default and explicit override behavior

Closes #548

@cvanelteren
cvanelteren requested a review from beckermr February 3, 2026 21:30
@cvanelteren

This comment was marked as resolved.

@cvanelteren
cvanelteren force-pushed the feat/text-borderstyle-rc branch from ad32f11 to 307d896 Compare February 3, 2026 21:33
Comment thread ultraplot/internals/rcsetup.py Outdated
"Width of the white border around a-b-c labels.",
),
"text.borderstyle": (
"miter",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this default be bevel?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yes! it should hazzy brain

@beckermr beckermr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See the comment above.

@cvanelteren
cvanelteren requested a review from beckermr February 4, 2026 03:56
@cvanelteren
cvanelteren merged commit 3103cb8 into main Feb 4, 2026
17 of 25 checks passed
@cvanelteren
cvanelteren deleted the feat/text-borderstyle-rc branch February 4, 2026 10:33
K-Mirembe-Mercy pushed a commit to K-Mirembe-Mercy/UltraPlot that referenced this pull request Mar 22, 2026
* Add rc default for text borderstyle

* Set correct default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Saving png with text and border=True leads to artifacts

2 participants