@@ -2700,106 +2700,100 @@ def errorbar(self, x, y, yerr=None, xerr=None,
2700
2700
"""
2701
2701
Plot an errorbar graph.
2702
2702
2703
- Call signature::
2704
-
2705
- errorbar(x, y, yerr=None, xerr=None,
2706
- fmt='', ecolor=None, elinewidth=None, capsize=None,
2707
- barsabove=False, lolims=False, uplims=False,
2708
- xlolims=False, xuplims=False, errorevery=1,
2709
- capthick=None)
2710
-
2711
- Plot *x* versus *y* with error deltas in *yerr* and *xerr*.
2712
- Vertical errorbars are plotted if *yerr* is not *None*.
2713
- Horizontal errorbars are plotted if *xerr* is not *None*.
2703
+ Plot x versus y with error deltas in yerr and xerr.
2704
+ Vertical errorbars are plotted if yerr is not None.
2705
+ Horizontal errorbars are plotted if xerr is not None.
2714
2706
2715
- *x*, *y*, * xerr* , and * yerr* can all be scalars, which plots a
2716
- single error bar at *x*, *y* .
2707
+ x, y, xerr, and yerr can all be scalars, which plots a
2708
+ single error bar at x, y .
2717
2709
2718
- Optional keyword arguments:
2710
+ Parameters
2711
+ ----------
2712
+ x : scalar
2713
+ y : scalar
2719
2714
2720
- * xerr*/* yerr*: [ scalar | N, Nx1, or 2xN array-like ]
2715
+ xerr/ yerr : scalar or array-like, shape(n,1) or shape(2,n), optional
2721
2716
If a scalar number, len(N) array-like object, or an Nx1
2722
2717
array-like object, errorbars are drawn at +/-value relative
2723
- to the data.
2718
+ to the data. Default is None.
2724
2719
2725
2720
If a sequence of shape 2xN, errorbars are drawn at -row1
2726
2721
and +row2 relative to the data.
2727
2722
2728
- * fmt*: [ '' | 'none' | plot format string ]
2729
- The plot format symbol. If * fmt* is 'none' (case-insensitive),
2723
+ fmt : plot format string, optional, default: None
2724
+ The plot format symbol. If fmt is 'none' (case-insensitive),
2730
2725
only the errorbars are plotted. This is used for adding
2731
2726
errorbars to a bar plot, for example. Default is '',
2732
2727
an empty plot format string; properties are
2733
2728
then identical to the defaults for :meth:`plot`.
2734
2729
2735
- * ecolor*: [ *None* | mpl color ]
2730
+ ecolor : mpl color, optional, default: None
2736
2731
A matplotlib color arg which gives the color the errorbar lines;
2737
- if * None* , use the color of the line connecting the markers.
2732
+ if None, use the color of the line connecting the markers.
2738
2733
2739
- * elinewidth* : scalar
2740
- The linewidth of the errorbar lines. If * None* , use the linewidth.
2734
+ elinewidth : scalar, optional, default: None
2735
+ The linewidth of the errorbar lines. If None, use the linewidth.
2741
2736
2742
- * capsize* : scalar
2743
- The length of the error bar caps in points; if * None* , it will
2737
+ capsize : scalar, optional, default: None
2738
+ The length of the error bar caps in points; if None, it will
2744
2739
take the value from ``errorbar.capsize``
2745
2740
:data:`rcParam<matplotlib.rcParams>`.
2746
2741
2747
- * capthick* : scalar
2748
- An alias kwarg to * markeredgewidth* (a.k.a. - * mew* ). This
2742
+ capthick : scalar, optional, default: None
2743
+ An alias kwarg to markeredgewidth (a.k.a. - mew). This
2749
2744
setting is a more sensible name for the property that
2750
2745
controls the thickness of the error bar cap in points. For
2751
- backwards compatibility, if * mew* or * markeredgewidth* are given,
2752
- then they will over-ride * capthick*. This may change in future
2746
+ backwards compatibility, if mew or markeredgewidth are given,
2747
+ then they will over-ride capthick. This may change in future
2753
2748
releases.
2754
2749
2755
- * barsabove*: [ *True* | * False* ]
2756
- if * True* , will plot the errorbars above the plot
2750
+ barsabove : bool, optional, default: False
2751
+ if True , will plot the errorbars above the plot
2757
2752
symbols. Default is below.
2758
2753
2759
- * lolims* / * uplims* / * xlolims* / * xuplims*: [ *False* | *True* ]
2754
+ lolims / uplims / xlolims / xuplims : bool, optional, default:None
2760
2755
These arguments can be used to indicate that a value gives
2761
2756
only upper/lower limits. In that case a caret symbol is
2762
2757
used to indicate this. lims-arguments may be of the same
2763
2758
type as *xerr* and *yerr*. To use limits with inverted
2764
2759
axes, :meth:`set_xlim` or :meth:`set_ylim` must be called
2765
2760
before :meth:`errorbar`.
2766
2761
2767
- * errorevery* : positive integer
2762
+ errorevery : positive integer, optional, default:1
2768
2763
subsamples the errorbars. e.g., if errorevery=5, errorbars for
2769
2764
every 5-th datapoint will be plotted. The data plot itself still
2770
2765
shows all data points.
2771
2766
2772
- All other keyword arguments are passed on to the plot command for the
2773
- markers. For example, this code makes big red squares with
2774
- thick green edges::
2775
-
2776
- x,y,yerr = rand(3,10)
2777
- errorbar(x, y, yerr, marker='s',
2778
- mfc='red', mec='green', ms=20, mew=4)
2779
-
2780
- where *mfc*, *mec*, *ms* and *mew* are aliases for the longer
2781
- property names, *markerfacecolor*, *markeredgecolor*, *markersize*
2782
- and *markeredgewidth*.
2783
-
2784
- valid kwargs for the marker properties are
2767
+ Returns
2768
+ -------
2769
+ plotline : :class:`~matplotlib.lines.Line2D` instance
2770
+ x, y plot markers and/or line
2771
+ caplines : list of :class:`~matplotlib.lines.Line2D` instances
2772
+ error bar cap
2773
+ barlinecols : list of :class:`~matplotlib.collections.LineCollection`
2774
+ horizontal and vertical error ranges.
2785
2775
2786
- %(Line2D)s
2776
+ Other Parameters
2777
+ ----------------
2778
+ kwargs : All other keyword arguments are passed on to the plot
2779
+ command for the markers. For example, this code makes big red
2780
+ squares with thick green edges::
2787
2781
2788
- Returns (*plotline*, *caplines*, *barlinecols*):
2782
+ x,y,yerr = rand(3,10)
2783
+ errorbar(x, y, yerr, marker='s', mfc='red',
2784
+ mec='green', ms=20, mew=4)
2789
2785
2790
- *plotline*: :class:`~matplotlib.lines.Line2D` instance
2791
- *x*, *y* plot markers and/or line
2786
+ where mfc, mec, ms and mew are aliases for the longer
2787
+ property names, markerfacecolor, markeredgecolor, markersize
2788
+ and markeredgewidth.
2792
2789
2793
- *caplines*: list of error bar cap
2794
- :class:`~matplotlib.lines.Line2D` instances
2795
- *barlinecols*: list of
2796
- :class:`~matplotlib.collections.LineCollection` instances for
2797
- the horizontal and vertical error ranges.
2790
+ valid kwargs for the marker properties are
2798
2791
2799
- **Example:**
2792
+ %(Line2D)s
2800
2793
2794
+ Examples
2795
+ --------
2801
2796
.. plot:: mpl_examples/statistics/errorbar_demo.py
2802
-
2803
2797
"""
2804
2798
kwargs = cbook .normalize_kwargs (kwargs , _alias_map )
2805
2799
kwargs .setdefault ('zorder' , 2 )
0 commit comments