Skip to content

Adapt stem plot #10165

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

Closed
timhoffm opened this issue Jan 4, 2018 · 5 comments
Closed

Adapt stem plot #10165

timhoffm opened this issue Jan 4, 2018 · 5 comments
Milestone

Comments

@timhoffm
Copy link
Member

timhoffm commented Jan 4, 2018

Proposed changes

Inspired by the example stem plot.

1. Z order

Currently the stems are on top of the markers. This is in agreement with the MATLAB behavior http://de.mathworks.com/help/matlab/ref/stem.html#btrw_xi-94

However, it looks a bit untidy. I propose to place the markers on top.

2. Example coloring

The example cycles through the stem colors. IMO this is an untypical use case. The example (in particular if we just have one) should show a typical diagram. Therefore, we should change it to just one stem color.

@anntzer
Copy link
Contributor

anntzer commented Jan 4, 2018

I would also argue that it should be considered a bug that ax.stem([1, 2]) does not cycle the colors but ax.stem([1, 2],"-.") does... not sure if #9565 helps with that.

@AdamsonMA
Copy link

I've also found that the lines overlapping the markers looked untidy. My solution was to create a new pyplot method for personal use that allows users to re-order which items appear on top when plotting. I would be glad to share the code if this issue is still open!

An example of the reordered plot:
image

@timhoffm
Copy link
Member Author

timhoffm commented Feb 4, 2018

It seems that #9565 (comment) also fixes the z-order. To prevent duplicate work, I wouldn't do anything here until the above is merged.

@jklymak
Copy link
Member

jklymak commented Feb 4, 2018

I mildly disagree about the zorder. Its easier to pick off a precise number when a solid line ends at the end to the stem.

@timhoffm
Copy link
Member Author

Ok, let's keep the zorder.

The example coloring is adapted in #13687.

@QuLogic QuLogic added this to the v3.1.0 milestone Mar 18, 2019
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

No branches or pull requests

5 participants