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

documentation mistake in errorbar #2974

Closed
oliverw1 opened this issue Apr 11, 2014 · 5 comments
Closed

documentation mistake in errorbar #2974

oliverw1 opened this issue Apr 11, 2014 · 5 comments
Milestone

Comments

@oliverw1
Copy link
Contributor

Copying this from the mpl mailinglist item.

When using errorbar, the documentation says the color of the errorbar lines will match with the color of the markers if ecolor=None. That’s not what I found. Apparently it takes over the color of the Line2D instance which interconnects the markers.

Short, Self Contained, Correct Example:

from pylab import *
plt.ion()  # saves typing show

x = np.arange(10)
y = np.random.rand(10)
xerr, yerr = y/4., y/4.

# Markers in red, but errorlines assume the color of the "trendline" (default rcparams: blue).
errorbar(x, y, yerr=yerr, mfc='r', marker='o', ecolor=None) 

# Errorlines get color green now - documentation not in line with results

figure(); errorbar(x, y, yerr=xerr, mfc='r', marker='o', ecolor=None, color='g')
# Errorlines get color blue now, because it can be specified - expected behaviour
figure(); errorbar(x, y, yerr=xerr, mfc='r', marker='o', ecolor='b', color='g')

I don't know what the original design decision was: to make sure the errorbarlines get the same color as the markers or if they should get the same color as the "trendline". In the latter case, only the documentation needs to be fixed (although I'm sure fixing the code will be just as easy in this case).

@tacaswell tacaswell added this to the v1.4.0 milestone Apr 11, 2014
@tacaswell
Copy link
Member

@oliverw1 Could you put together a pull request to correct the documentation?

@oliverw1
Copy link
Contributor Author

Will do.

@tacaswell
Copy link
Member

@oliverw1 Did I miss the PR for this?

oliverw1 added a commit to oliverw1/matplotlib that referenced this issue Apr 30, 2014
@oliverw1
Copy link
Contributor Author

My apologies - I lost sight of this because my old laptop died. Also, this is my first pull request, so I hope I followed the mpl guidelines (I didn't branch off the maintenance though, sorry). Feel free to educate me in my wrong-doings. :)

@tacaswell
Copy link
Member

Don't worry, I don't think we plan to do a 1.3.2, and it can always be back-ported.

efiring added a commit that referenced this issue May 3, 2014
mpl issue: #2974 - documentation corrected
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

2 participants