-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
MarkerStyle transformation not carried over to legend #20613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
_transform is private. Is this how we want end users making rotated markers? |
My understanding is that to rotate markers you should create a new Marker and specify it's path. That should work with legend. |
Ah, indeed, I missed the fact that this was accessing a private attribute... |
So just to be sure, rotating built-in markers is not supported? @jklymak, the only way I know to create a new marker is: import matplotlib.pyplot as ppl
m1 = [(0,-1), (-2,0), (0,1), (2,0), (0,-1)]
m2 = 'd'
kw = dict(mfc = 'w', mew = 20, ms = 100)
ppl.plot(-1, 0, marker = m1, **kw)
ppl.plot(1, 0, marker = m2, **kw)
ppl.axis([-2, 2, -1, 1])
ppl.show() Which yields: The two methods look nothing alike because AFAIK there is no user-facing method to specify the |
First, as far as I can tell the code above works fine on 3.4.2 - the marker is rotated 90 degrees in the legend We could close this, or turn into an issue about better access to marker methods. In particular, I don't see why we wouldn't expose joinstyle for the user to modify when creating a marker. I think it should also be possible to have a |
See #19195 for discussion of this. I'll add the discussion of join style and close here, but PRs welcome for adding more functionality to markers! |
Oh, great, that's good news. Thanks.
That would be really neat, especially since something like |
Adding rotation has the approval of the core devs, someone just has to do it! I don't see why anyone would object to adding jointstyle at the same time. |
Bug report
When I transform a MarkerStyle, it displays fine in the plot but not in the legend.
Code for reproduction
Actual outcome
Matplotlib version
The text was updated successfully, but these errors were encountered: