Skip to content

Fix set_fillstyle dropping marker transform#31296

Closed
wavebyrd wants to merge 1 commit into
matplotlib:mainfrom
wavebyrd:fix-set-fillstyle-drops-marker-transform
Closed

Fix set_fillstyle dropping marker transform#31296
wavebyrd wants to merge 1 commit into
matplotlib:mainfrom
wavebyrd:fix-set-fillstyle-drops-marker-transform

Conversation

@wavebyrd

Copy link
Copy Markdown

Summary

Line2D.set_fillstyle() was constructing a new MarkerStyle with only the marker symbol and the new fillstyle, throwing away the user-supplied transform, capstyle, and joinstyle from the existing marker. This meant that markers with rotation transforms lost their rotation when the fillstyle was updated after plotting.

The fix passes through the existing marker's user transform, capstyle, and joinstyle to the replacement MarkerStyle.

Closes #31257

Test

Added test_set_fillstyle_preserves_marker_transform in test_lines.py that sets a rotation transform on a marker, changes the fillstyle, and asserts the transform is still present.

Line2D.set_fillstyle() was creating a new MarkerStyle with only the
marker symbol and fillstyle, discarding any user-supplied transform,
capstyle, or joinstyle from the existing marker. This caused markers
with rotation transforms to lose their rotation when the fillstyle
was changed.

Now passes through the existing marker's user transform, capstyle,
and joinstyle when constructing the replacement MarkerStyle.

Closes matplotlib#31257
@github-actions

Copy link
Copy Markdown

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide.
Please let us know if (and how) you use AI, it will help us give you better feedback on your PR.

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@melissawm melissawm moved this to Needs review in First Time Contributors Mar 13, 2026
@rcomer rcomer added the ai-contribution PRs that are AI generated without a human in the loop label Mar 13, 2026
@rcomer

rcomer commented Mar 13, 2026

Copy link
Copy Markdown
Member

This account is opening a lot of PRs in a short space of time so I assume they are automated.
https://github.com/pulls?q=is%3Apr+author%3Awavebyrd+archived%3Afalse+

Closing the PR and blocking the account for a week per our policy
https://matplotlib.org/devdocs/devel/contribute.html#restrictions-on-generative-ai-usage

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

Labels

ai-contribution PRs that are AI generated without a human in the loop first-contribution

Projects

Development

Successfully merging this pull request may close these issues.

[Bug]: Update of markers' fillstyle removes rotation transform

3 participants