Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Autoscale to automatically include a tiny margin with Axes.errorbar() #1711

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
dmcdougall opened this issue Jan 27, 2013 · 6 comments
Closed
Milestone

Comments

@dmcdougall
Copy link
Member

As reported by Neal Becker on our devloper mailing list. Here's an example that reproduces the issue:

x = [3, 6, 10]
y = [1, 2, 3]
import matplotlib.pyplot as plt

plt.errorbar(x, y, 0.2)
plt.show()

The error bars on either end of the x-axis are not visible. The error bar 'feet' should be taken into account during the autoscaling process. The current state of v1.2.x produces this:

Screen Shot 2013-01-27 at 13 13 35

@szlike
Copy link

szlike commented Mar 12, 2013

If you move the figure, you will see there is an errorbar.
It is not apparent, but I think it is not an issue.

@pelson
Copy link
Member

pelson commented Mar 13, 2013

It is not apparent, but I think it is not an issue.

I'm inclined to agree. The obvious solution for the user would be to add a margin (something like plt.gca().set_xmargin(0.1)).

@dmcdougall / @nbecker - do you still think the data limits should take the feet into account?

@szlike
Copy link

szlike commented Mar 13, 2013

Thank pelson@pelson I was working on some sort of solutions such as color/bold the error bar to make it more "apparent".
By the way, I am working on this #568. Do you think the user should be able to plot a error bar for a single point (which means only this single point need error bar) or they need to provide a error surface for all the points in the figure.

@x1o
Copy link

x1o commented Aug 5, 2016

I also find it annoying slightly: screenshot from 2016-08-06 00-52-12
Here's what R comes up with for comparison: screenshot from 2016-08-06 00-50-53

@efiring
Copy link
Member

efiring commented Aug 5, 2016

This R-like strategy of including margins is the new default for autoscaling in 2.0, which is close to being finalized. If there is an autoscaling problem with the 2.x line, please open a new issue for it.

@efiring efiring closed this as completed Aug 5, 2016
@x1o
Copy link

x1o commented Aug 5, 2016

@efiring Good to hear, thank you!

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

No branches or pull requests

5 participants