You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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!
Activity
anntzer commentedon Jan 4, 2018
I would also argue that it should be considered a bug that
ax.stem([1, 2])does not cycle the colors butax.stem([1, 2],"-.")does... not sure if #9565 helps with that.AdamsonMA commentedon Feb 4, 2018
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:

timhoffm commentedon 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 commentedon 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 commentedon Mar 17, 2019
Ok, let's keep the zorder.
The example coloring is adapted in #13687.