healpy.projaxes.HpxMollweideAxes.axvspan¶
-
HpxMollweideAxes.
axvspan
(xmin, xmax, ymin=0, ymax=1, **kwargs)¶ Add a vertical span (rectangle) across the axes.
Call signature:
axvspan(xmin, xmax, ymin=0, ymax=1, **kwargs)
x coords are in data units and y coords are in axes (relative 0-1) units.
Draw a vertical span (rectangle) from xmin to xmax. With the default values of ymin = 0 and ymax = 1, this always spans the yrange, regardless of the ylim settings, even if you change them, e.g., with the
set_ylim()
command. That is, the vertical extent is in axes coords: 0=bottom, 0.5=middle, 1.0=top but the y location is in data coordinates.Return value is the
matplotlib.patches.Polygon
instance.Examples:
draw a vertical green translucent rectangle from x=1.25 to 1.55 that spans the yrange of the axes:
>>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
Valid kwargs are
Polygon
properties:agg_filter: unknown alpha: float or None animated: [True | False] antialiased or aa: [True | False] or None for default axes: anAxes
instance clip_box: amatplotlib.transforms.Bbox
instance clip_on: [True | False] clip_path: [ (Path
,Transform
) |Patch
| None ] color: matplotlib color spec contains: a callable function edgecolor or ec: mpl color spec, or None for default, or ‘none’ for no color facecolor or fc: mpl color spec, or None for default, or ‘none’ for no color figure: amatplotlib.figure.Figure
instance fill: [True | False] gid: an id string hatch: [‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’] label: string or anything printable with ‘%s’ conversion. linestyle or ls: [‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’] linewidth or lw: float or None for default lod: [True | False] path_effects: unknown picker: [None|float|boolean|callable] rasterized: [True | False | None] sketch_params: unknown snap: unknown transform:Transform
instance url: a url string visible: [True | False] zorder: any numberSee also
axhspan()
- for example plot and source code