Skip to content

#5856: added option to create vertically-oriented stem plots #6168

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
wants to merge 11 commits into from

Conversation

vecuenca
Copy link
Contributor

This is an attempt at implementing #5856.

I introduced a 'vertical' parameter that, upon being passed as true to the stem method, creates a vertical stem plot.

location from the baseline to *y*, and places a marker there
using *markerfmt*. A horizontal line at 0 is is plotted using
*basefmt*.

It is possible to create a vertically-oriented stem plot
by providing vertical=True.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you convert this to numpydoc format and enumerate all of the things that are popped out of the kwargs in the docstring?

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Mar 17, 2016
@vecuenca
Copy link
Contributor Author

Is this what you were asking for regarding the flipping?

@tacaswell
Copy link
Member

Yes, but I think you can do the same with the other two if vertical blocks.

@@ -2420,9 +2444,16 @@ def stem(self, *args, **kwargs):
except IndexError:
basefmt = kwargs.pop('basefmt', 'r-')

# Check the orientation variable to see if the user
# wants a vertical or horizontal stem plot
orientation = kwargs.pop('orientation', 'horizontal')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should probably do some validation here to make sure 'aardvark' or the like does not get passed in.

@tacaswell
Copy link
Member

Is this the PR that will be the combined effort?

This will also need a test + a whats_new entry.

@vecuenca
Copy link
Contributor Author

Yup, this is the combined PR.
Re: testing, would test_axes.py be an appropriate place to make one?
Im not too sure where to put the whats_new entry as well.

@tacaswell
Copy link
Member

Where ever the existing tests of stemplot live is the correct place to put these.

See https://github.com/matplotlib/matplotlib/tree/master/doc/users/whats_new for the whats_new entry instructions.

@yongzhez
Copy link
Contributor

Hi I'm working with @vincent-cuenca and I was wondering what the progress on this pull request is. What else is needed to complete this pull request?

@@ -2374,17 +2376,39 @@ def stem(self, *args, **kwargs):

If no *x* values are provided, the default is (0, 1, ..., len(y) - 1)

Return value is a tuple (*markerline*, *stemlines*,
*baseline*).
Optional parameters:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not conform with numpy doc specs see #6240 for a similar fix.
If you change it to Other Parameters it should work. As it is this section will not be in the web generated version of the docs.

See https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt for more numpy docs info.

The output from the docs build should this is in https://travis-ci.org/matplotlib/matplotlib/jobs/118347853#L1036

@jenshnielsen
Copy link
Member

Apart from inline comment 👍 from me.

@tacaswell tacaswell removed this from the 2.1 (next point release) milestone Aug 29, 2017
@tacaswell tacaswell modified the milestones: 2.2 (next next feature release), 2.1 (next point release) Aug 29, 2017
@jklymak
Copy link
Member

jklymak commented Jul 14, 2020

This actually seemed done, but never got a final review and now needs a rebase. It'd be a reasonable good first issue for someone to revive it.

@jklymak jklymak added Good first issue Open a pull request against these issues if there are no active ones! and removed status: needs revision labels Jul 14, 2020
@jklymak jklymak modified the milestones: needs sorting, v3.4.0 Jul 14, 2020
@QuLogic
Copy link
Member

QuLogic commented Aug 6, 2020

This PR is too old to do a direct push, so I've opened a new one, noted above.

@QuLogic QuLogic removed the Good first issue Open a pull request against these issues if there are no active ones! label Aug 6, 2020
@timhoffm
Copy link
Member

timhoffm commented Aug 8, 2020

Closing in favor of #18187.

@vecuenca thanks for the contribution. Your name is still present in the commits of #18187, so you will still get credit once it is merged.

@jklymak jklymak closed this Aug 9, 2020
@QuLogic
Copy link
Member

QuLogic commented Aug 11, 2020

Note, this should have closed automatically.

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

Successfully merging this pull request may close these issues.

9 participants