Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add stairstep plotting functionality#1068

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
dmcdougall wants to merge2 commits intomatplotlib:masterfromdmcdougall:stairs

Conversation

dmcdougall
Copy link
Member

This feature replicates Matlab's `stairs' function to produce stairstep
type plots. These plots are useful for plots in signal processing for
looking at discretely sampled data. Valid function calls are

ax.stairs(y)# Make a stairstep plot of the values in yax.stairs(x,y)# Stairstep plot of the values in y at points in x

Seehere for the Matlab interface.

Example output:

example output

This feature replicates Matlab's `stairs' function to produce stairsteptype plots. These plots are useful for plots in signal processing forlooking at discretely sampled data. Valid function calls arestairs(y) # Make a stairstep plot of the values in ystairs(x, y) # Stairstep plot of the values in y at points in x
@efiring
Copy link
Member

@dmcdougall
Copy link
MemberAuthor

I did not know this existed!

Damon McDougall
d.mcdougall@warwick.ac.uk
http://damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom

On Friday, 10 August 2012 at 19:20, Eric Firing wrote:

How does this differ from step?
http://matplotlib.sourceforge.net/examples/pylab_examples/step_demo.html


Reply to this email directly or view it on GitHub (#1068 (comment)).


__all__ = ['stairs']

def stairs(axes, *args, **kwargs):
Copy link
Member

Choose a reason for hiding this comment

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

To be consistent with the rest of the code-base, I would change "axes" to "ax"

@dmcdougall
Copy link
MemberAuthor

This should probably be closed since it already exists, as@efiring pointed out. Unless anybody disagrees? It seems moot to duplicate existing functionality.

@mdboom
Copy link
Member

Well, perhaps the meta question is: what made it difficult for@dmcdougall to find the existing functionality, and how could that be improved? Maybe we need a patch for that...

@efiring
Copy link
Member

We do, and Ben started on at least part of the solution, which is putting some organization and editing into the gallery. There is only one step example, and it is burried in the middle; I had to scan the gallery twice to find it, and if I hadn't been pretty sure it was there, I would likely have missed it.

@dmcdougall
Copy link
MemberAuthor

I went to thematplotlib homepage, and did a command-f forstairs (because someone on the mailing list was asking how to make stairstep plots).

Also,step is not on the list on the homepage either.

Perhaps re-namingstep tostairs (or wrapping it, so people's scripts don't break) so the Matlab and matplotlib naming conventions are more aligned would be useful to avoid future confusion. Or, addingstep to the homepage so it can be found more easily.

@mdboom
Copy link
Member

Yeah -- that list on the homepage was manually generated many versions ago, so it's incomplete. As part of my reorganization of the front page in#1067 I'm proposing to just get rid of it and funnel people to the pyplot documentation instead. Not sure that's the best solution either, as some people surely find that list useful.

@dmcdougall
Copy link
MemberAuthor

I use it every day. I command-f the function I want so I can look at the docs. I always have to check it to remind myself, for example, which element of theextent kwarg list inimshow refers to which bound.

@pelson
Copy link
Member

@mdboom: Maybe a similar table to the one that currently exists could be autogenerated and the content come from theautosummary extension.

@efiring
Copy link
Member

There is useful discussion here, but as a pull request, this really needs to be closed.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@dmcdougall@efiring@mdboom@pelson@WeatherGod

[8]ページ先頭

©2009-2025 Movatter.jp