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
This is not a major issue indeed, but I lost quite time until I found where the problem was. About pyplot.errorbar (plot x versus y with error deltas in yerr and xerr) the doc states this about the first optional argument:
xerr/yerr: [ scalar | N, Nx1, or 2xN array-like ] If a scalar number, len(N) array-like
object, or an Nx1 array-like object, errorbars are drawn at +/-value relative to the data.(...)
But in some cases this is not working as expected (or at least, after reading the doc, as I understand it should work). I prepared an example to show where the problems arise (tested with matplotlib 1.4.x, numpy 1.7.1; python 3.3.2):
- passing in a (N, 1) shaped array as input causes the zipping to
generate an extra dimension
- use squeeze to get rid of useless dimensions
- use atleast_1d to make sure scalars remain 1D ((1, ) vs () shape)
- closesmatplotlib#2197
- passing in a (N, 1) shaped array as input causes the zipping to
generate an extra dimension
- closesmatplotlib#2197
- use ravel + reshape to do shape validation + getting rid of
extra dimension
This is not a major issue indeed, but I lost quite time until I found where the problem was. About pyplot.errorbar (plot x versus y with error deltas in yerr and xerr) the doc states this about the first optional argument:
xerr/yerr: [ scalar | N, Nx1, or 2xN array-like ] If a scalar number, len(N) array-like
object, or an Nx1 array-like object, errorbars are drawn at +/-value relative to the data.(...)
But in some cases this is not working as expected (or at least, after reading the doc, as I understand it should work). I prepared an example to show where the problems arise (tested with matplotlib 1.4.x, numpy 1.7.1; python 3.3.2):
Thanks!
The text was updated successfully, but these errors were encountered: