X Tutup
Skip to content

Fix marker fillstyle rotation when updating fillstyle in Line2D#31265

Open
jayaprajapatii wants to merge 1 commit intomatplotlib:mainfrom
jayaprajapatii:fix-marker-fillstyle-rotation
Open

Fix marker fillstyle rotation when updating fillstyle in Line2D#31265
jayaprajapatii wants to merge 1 commit intomatplotlib:mainfrom
jayaprajapatii:fix-marker-fillstyle-rotation

Conversation

@jayaprajapatii
Copy link

Closes #31257

Description

Calling Line2D.set_fillstyle() recreated the MarkerStyle object without preserving the existing user transform. As a result, markers that had a rotation transform applied lost their rotation when the fillstyle was updated.

This patch recreates the MarkerStyle with the requested fillstyle while preserving the existing _user_transform, ensuring that rotated markers retain their orientation.

Testing

  • Verified using the reproduction example from the issue.

@jayaprajapatii jayaprajapatii force-pushed the fix-marker-fillstyle-rotation branch from a5bc16f to 80cd63d Compare March 10, 2026 06:55
@anntzer
Copy link
Contributor

anntzer commented Mar 10, 2026

While this maybe works (I didn't check), this will likely not fix the same issue with e.g. marker capstyles and joinstyles. A more general fix seems appropriate.

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.

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

2 participants

X Tutup