@@ -2485,9 +2485,7 @@ def broken_barh(self, xranges, yrange, **kwargs):
2485
2485
2486
2486
Notes
2487
2487
-----
2488
- ..
2489
- [Empty notes is a workaround to prevent the data note from being
2490
- injected into the Returns section.]
2488
+ .. [Notes section required for data comment. See #10189.]
2491
2489
2492
2490
"""
2493
2491
# process the unit information
@@ -2941,68 +2939,65 @@ def errorbar(self, x, y, yerr=None, xerr=None,
2941
2939
xlolims = False , xuplims = False , errorevery = 1 , capthick = None ,
2942
2940
** kwargs ):
2943
2941
"""
2944
- Plot an errorbar graph .
2942
+ Plot y versus x as lines and/or markers with attached errorbars .
2945
2943
2946
- Plot x versus y with error deltas in yerr and xerr.
2947
- Vertical errorbars are plotted if yerr is not None.
2948
- Horizontal errorbars are plotted if xerr is not None.
2949
-
2950
- x, y, xerr, and yerr can all be scalars, which plots a
2951
- single error bar at x, y.
2944
+ *x*, *y* define the data locations, *xerr*, *yerr* define the errorbar
2945
+ sizes. By default, this draws the data markers/lines as well the
2946
+ errorbars. Use fmt='none' to draw errorbars without any data markers.
2952
2947
2953
2948
Parameters
2954
2949
----------
2955
- x : scalar or array-like
2956
- y : scalar or array-like
2950
+ x, y : scalar or array-like
2951
+ The data positions.
2957
2952
2958
- xerr/yerr : scalar or array-like, shape(N,) or shape(2,N), optional
2959
- If a scalar number, len(N) array-like object, or a N-element
2960
- array-like object, errorbars are drawn at +/-value relative
2961
- to the data. Default is None.
2953
+ xerr, yerr : scalar or array-like, shape(N,) or shape(2,N), optional
2954
+ The errorbar sizes:
2962
2955
2963
- If a sequence of shape 2xN, errorbars are drawn at -row1
2964
- and +row2 relative to the data.
2956
+ - scalar: Symmetric +/- values for all data points.
2957
+ - shape(N,): Symmetric +/-values for each data point.
2958
+ - shape(2,N): Separate + and - values for each data point.
2959
+ - *None*: No errorbar.
2960
+
2961
+ fmt : plot format string, optional, default: ''
2962
+ The format for the data points / data lines. See `~.plot` for
2963
+ details.
2965
2964
2966
- fmt : plot format string, optional, default: None
2967
- The plot format symbol. If fmt is 'none' (case-insensitive),
2968
- only the errorbars are plotted. This is used for adding
2969
- errorbars to a bar plot, for example. Default is '',
2970
- an empty plot format string; properties are
2971
- then identical to the defaults for :meth:`plot`.
2965
+ Use 'none' (case insensitive) to plot errorbars without any data
2966
+ markers.
2972
2967
2973
2968
ecolor : mpl color, optional, default: None
2974
- A matplotlib color arg which gives the color the errorbar lines;
2975
- if None, use the color of the line connecting the markers.
2969
+ A matplotlib color arg which gives the color the errorbar lines.
2970
+ If None, use the color of the line connecting the markers.
2976
2971
2977
2972
elinewidth : scalar, optional, default: None
2978
- The linewidth of the errorbar lines. If None, use the linewidth.
2973
+ The linewidth of the errorbar lines. If None, the linewidth of
2974
+ the current style is used.
2979
2975
2980
2976
capsize : scalar, optional, default: None
2981
- The length of the error bar caps in points; if None, it will
2977
+ The length of the error bar caps in points. If None, it will
2982
2978
take the value from ``errorbar.capsize``
2983
2979
:data:`rcParam<matplotlib.rcParams>`.
2984
2980
2985
2981
capthick : scalar, optional, default: None
2986
- An alias kwarg to markeredgewidth (a.k.a. - mew). This
2987
- setting is a more sensible name for the property that
2982
+ An alias to the keyword argument * markeredgewidth* (a.k.a. * mew*).
2983
+ This setting is a more sensible name for the property that
2988
2984
controls the thickness of the error bar cap in points. For
2989
- backwards compatibility, if mew or markeredgewidth are given,
2990
- then they will over-ride capthick. This may change in future
2985
+ backwards compatibility, if * mew* or * markeredgewidth* are given,
2986
+ then they will over-ride * capthick* . This may change in future
2991
2987
releases.
2992
2988
2993
2989
barsabove : bool, optional, default: False
2994
- If True , will plot the errorbars above the plot
2990
+ If True, will plot the errorbars above the plot
2995
2991
symbols. Default is below.
2996
2992
2997
- lolims / uplims / xlolims / xuplims : bool, optional, default:None
2998
- These arguments can be used to indicate that a value gives
2999
- only upper/lower limits. In that case a caret symbol is
3000
- used to indicate this. lims-arguments may be of the same
3001
- type as *xerr* and *yerr*. To use limits with inverted
3002
- axes, :meth:`set_xlim` or :meth:`set_ylim` must be called
3003
- before :meth:`errorbar`.
2993
+ lolims, uplims, xlolims, xuplims : bool, optional, default: None
2994
+ These arguments can be used to indicate that a value gives only
2995
+ upper/lower limits. In that case a caret symbol is used to
2996
+ indicate this. *lims*-arguments may be of the same type as *xerr*
2997
+ and *yerr*. To use limits with inverted axes, :meth:`set_xlim`
2998
+ or :meth:`set_ylim` must be called before :meth:`errorbar`.
3004
2999
3005
- errorevery : positive integer, optional, default:1
3000
+ errorevery : positive integer, optional, default: 1
3006
3001
Subsamples the errorbars. e.g., if errorevery=5, errorbars for
3007
3002
every 5-th datapoint will be plotted. The data plot itself still
3008
3003
shows all data points.
@@ -3031,13 +3026,18 @@ def errorbar(self, x, y, yerr=None, xerr=None,
3031
3026
errorbar(x, y, yerr, marker='s', mfc='red',
3032
3027
mec='green', ms=20, mew=4)
3033
3028
3034
- where mfc, mec, ms and mew are aliases for the longer
3035
- property names, markerfacecolor, markeredgecolor, markersize
3036
- and markeredgewidth.
3029
+ where * mfc*, * mec*, *ms* and * mew* are aliases for the longer
3030
+ property names, * markerfacecolor*, * markeredgecolor*, * markersize*
3031
+ and * markeredgewidth* .
3037
3032
3038
- Valid kwargs for the marker properties are
3033
+ Valid kwargs for the marker properties are `~.Lines2D` properties:
3039
3034
3040
3035
%(Line2D)s
3036
+
3037
+ Notes
3038
+ -----
3039
+ .. [Notes section required for data comment. See #10189.]
3040
+
3041
3041
"""
3042
3042
kwargs = cbook .normalize_kwargs (kwargs , _alias_map )
3043
3043
# anything that comes in as 'None', drop so the default thing
0 commit comments