healpy.projaxes.GnomonicAxes.errorbar

GnomonicAxes.errorbar(x, y, yerr=None, xerr=None, fmt='-', ecolor=None, elinewidth=None, capsize=3, barsabove=False, lolims=False, uplims=False, xlolims=False, xuplims=False, errorevery=1, capthick=None, **kwargs)

Plot an errorbar graph.

Call signature:

errorbar(x, y, yerr=None, xerr=None,
         fmt='-', ecolor=None, elinewidth=None, capsize=3,
         barsabove=False, lolims=False, uplims=False,
         xlolims=False, xuplims=False, errorevery=1,
         capthick=None)

Plot x versus y with error deltas in yerr and xerr. Vertical errorbars are plotted if yerr is not None. Horizontal errorbars are plotted if xerr is not None.

x, y, xerr, and yerr can all be scalars, which plots a single error bar at x, y.

Optional keyword arguments:

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.

If a sequence of shape 2xN, errorbars are drawn at -row1 and +row2 relative to the data.

fmt: ‘-‘
The plot format symbol. If fmt is None, only the errorbars are plotted. This is used for adding errorbars to a bar plot, for example.
ecolor: [ None | mpl color ]
A matplotlib color arg which gives the color the errorbar lines; if None, use the marker color.
elinewidth: scalar
The linewidth of the errorbar lines. If None, use the linewidth.
capsize: scalar
The length of the error bar caps in points
capthick: scalar
An alias kwarg to markeredgewidth (a.k.a. - mew). This setting is a more sensible name for the property that controls the thickness of the error bar cap in points. For backwards compatibility, if mew or markeredgewidth are given, then they will over-ride capthick. This may change in future releases.
barsabove: [ True | False ]
if True, will plot the errorbars above the plot symbols. Default is below.
lolims / uplims / xlolims / xuplims: [ False | True ]
These arguments can be used to indicate that a value gives only upper/lower limits. In that case a caret symbol is used to indicate this. lims-arguments may be of the same type as xerr and yerr.
errorevery: positive integer
subsamples the errorbars. e.g., if everyerror=5, errorbars for every 5-th datapoint will be plotted. The data plot itself still shows all data points.

All other keyword arguments are passed on to the plot command for the markers. For example, this code makes big red squares with thick green edges:

x,y,yerr = rand(3,10)
errorbar(x, y, yerr, marker='s',
         mfc='red', mec='green', ms=20, mew=4)

where mfc, mec, ms and mew are aliases for the longer property names, markerfacecolor, markeredgecolor, markersize and markeredgewith.

valid kwargs for the marker properties are

agg_filter: unknown alpha: float (0.0 transparent through 1.0 opaque) animated: [True | False] antialiased or aa: [True | False] axes: an Axes instance clip_box: a matplotlib.transforms.Bbox instance clip_on: [True | False] clip_path: [ (Path, Transform) | Patch | None ] color or c: any matplotlib color contains: a callable function dash_capstyle: [‘butt’ | ‘round’ | ‘projecting’] dash_joinstyle: [‘miter’ | ‘round’ | ‘bevel’] dashes: sequence of on/off ink in points drawstyle: [‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’] figure: a matplotlib.figure.Figure instance fillstyle: [‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’] gid: an id string label: string or anything printable with ‘%s’ conversion. linestyle or ls: ['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'. linewidth or lw: float value in points lod: [True | False] marker: unknown markeredgecolor or mec: any matplotlib color markeredgewidth or mew: float value in points markerfacecolor or mfc: any matplotlib color markerfacecoloralt or mfcalt: any matplotlib color markersize or ms: float markevery: None | integer | (startind, stride) path_effects: unknown picker: float distance in points or callable pick function fn(artist, event) pickradius: float distance in points rasterized: [True | False | None] sketch_params: unknown snap: unknown solid_capstyle: [‘butt’ | ‘round’ | ‘projecting’] solid_joinstyle: [‘miter’ | ‘round’ | ‘bevel’] transform: a matplotlib.transforms.Transform instance url: a url string visible: [True | False] xdata: 1D array ydata: 1D array zorder: any number

Returns (plotline, caplines, barlinecols):

plotline: Line2D instance
x, y plot markers and/or line
caplines: list of error bar cap
Line2D instances
barlinecols: list of
LineCollection instances for the horizontal and vertical error ranges.

Example: