You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Trying to plot only error bars (with no line connecting data points) results in empty plot #8117
The error bars are not visible in 2.0. Further inspection indicates that they are, in fact, drawn with the same color as the data line (that connects each data point), i.e., (0, 0, 0, 0).
Note that the docstring of errorbar is a bit inconsistent (emphasis mine):
fmt : plot format string, optional, default: None
The plot format symbol. If fmt is 'none' (case-insensitive),
only the errorbars are plotted. This is used for adding
errorbars to a bar plot, for example.
ecolor : mpl color, optional, default: None
A matplotlib color arg which gives the color the errorbar lines; if None, use the color of the line connecting the markers.
A strict reading of the doc for ecolor suggests that the current behavior is "correct", but the doc of fmt clearly indicates that this is not the intent.
According to the code, using None is deprecated since 1.4 anyway:
if fmt is None:
fmt = 'none'
msg = ('Use of None object as fmt keyword argument to ' +
'suppress plotting of data values is deprecated ' +
'since 1.4; use the string "none" instead.')
warnings.warn(msg, mplDeprecation, stacklevel=1)
Activity
tacaswell commentedon Feb 23, 2017
Agree this should be release critical (and my fault 😞 )
dstansby commentedon Feb 24, 2017
git-bisecttells me that this appeared in #5593dstansby commentedon Feb 27, 2017
Just bumped into this doing day-to-day work - a workaround is
plt.errorbar(x, y, fmt='none', ecolor=ebarcolor)where
ebarcoloris the colour desired for the errorbars.dstansby commentedon Feb 27, 2017
(re. doc inconsistency, the difference is
None(not a string) and'none'(a string))tacaswell commentedon Feb 27, 2017
what is the doc inconsistency between
Noneand'none'? I think we are pretty consistent about'none'-> no style andNone-> default style.dstansby commentedon Feb 27, 2017
According to the code, using
Noneis deprecated since 1.4 anyway:tacaswell commentedon Mar 13, 2017
closed by #8163