Skip to content
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

Added a new example to create error boxes using a PatchCollection #6596

Merged
merged 3 commits into from Jun 18, 2016

Conversation

tmdavison
Copy link
Contributor

Adding a new example I first created here: http://stackoverflow.com/a/37856171/588071

@tacaswell
Copy link
Member

Thanks for doing this!

Can you run this through a pep8 linter?

closes #6593

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Jun 16, 2016
@tmdavison
Copy link
Contributor Author

No problem, I think that should be ok now?

def makeErrorBoxes(xdata, ydata, xerror, yerror, fc='r', ec='None', alpha=0.5):
'''
Function to create error boxes
'''
Copy link
Member

Choose a reason for hiding this comment

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

I forget, did we want examples to have functions like this when it is just being called once? I thought it was only desirable to do for the examples to de-duplicate code?

Copy link
Member

Choose a reason for hiding this comment

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

I agree, in such a short example, there's not much benefit to this function, and there are more than enough comments to make it clear what all the code is doing.

@anntzer
Copy link
Contributor

anntzer commented Jun 17, 2016

Some suggestions (partially rendundant with other comments):

  • Rename function to plot_error_boxes; pass ax as first argument, and include the call to errorbar within the function.
  • Either write a complete docstring, or just drop it. (Documenting makeErrorBoxes as "Function to create error boxes" is... not very helpful.)

@WeatherGod WeatherGod merged commit 25ce666 into matplotlib:master Jun 18, 2016
@WeatherGod
Copy link
Member

does this get backported anywhere?

@jenshnielsen
Copy link
Member

I think it should go into 2.x too

WeatherGod added a commit that referenced this pull request Jul 14, 2016
Added a new example to create error boxes using a PatchCollection
@WeatherGod
Copy link
Member

backported to v2.x via 9ea7315

@QuLogic QuLogic modified the milestones: 2.0 (style change major release), 2.1 (next point release) Jul 14, 2016
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

Successfully merging this pull request may close these issues.

None yet

8 participants