cartopy.mpl.feature_artist.FeatureArtist#
- class cartopy.mpl.feature_artist.FeatureArtist(feature, **kwargs)[source]#
Bases:
CollectionA subclass of
Collectioncapable of drawing acartopy.feature.Feature.- Parameters:
feature – An instance of
cartopy.feature.Featureto draw.styler – A callable that given a geometry, returns matplotlib styling parameters.
**kwargs – Keyword arguments to be used when drawing the feature. These will override those shared with the feature.
- draw(renderer)[source]#
Draw the geometries of the feature that intersect with the extent of the
cartopy.mpl.geoaxes.GeoAxesinstance to which this object has been added.
- set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, array=<UNSET>, capstyle=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, gid=<UNSET>, hatch=<UNSET>, hatch_linewidth=<UNSET>, hatchcolor=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, mouseover=<UNSET>, norm=<UNSET>, offset_transform=<UNSET>, offsets=<UNSET>, path_effects=<UNSET>, paths=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, urls=<UNSET>, visible=<UNSET>, zorder=<UNSET>)#
Set multiple properties at once.
a.set(a=A, b=B, c=C)
is equivalent to
a.set_a(A) a.set_b(B) a.set_c(C)
In addition to the full property names, aliases are also supported, e.g.
set(lw=2)is equivalent toset(linewidth=2), but it is an error to pass both simultaneously.The order of the individual setter calls matches the order of parameters in
set(). However, most properties do not depend on each other so that order is rarely relevant.Supported properties are
- Properties:
agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image alpha: array-like or float or None animated: bool antialiased or aa or antialiaseds: bool or list of bools array: array-like or None capstyle:
CapStyleor {‘butt’, ‘projecting’, ‘round’} clim: (vmin: float, vmax: float) clip_box:BboxBaseor None clip_on: bool clip_path: Patch or (Path, Transform) or None cmap:Colormapor str or None color: color or list of RGBA tuples edgecolor or ec or edgecolors: color or list of color or ‘face’ facecolor or facecolors or fc: unknown figure:FigureorSubFiguregid: str hatch: {‘/’, ‘\’, ‘|’, ‘-’, ‘+’, ‘x’, ‘o’, ‘O’, ‘.’, ‘*’} hatch_linewidth: unknown hatchcolor: color or list of color or ‘edge’ in_layout: bool joinstyle:JoinStyleor {‘miter’, ‘round’, ‘bevel’} label: object linestyle or dashes or linestyles or ls: {‘-’, ‘–’, ‘-.’, ‘:’, ‘’, …} or (offset, on-off-seq) or list thereof linewidth or linewidths or lw: float or list of floats mouseover: bool norm:Normalizeor str or None offset_transform or transOffset:Transformoffsets: (N, 2) or (2,) array-like path_effects: list ofAbstractPathEffectpaths: unknown picker: None or bool or float or callable pickradius: float rasterized: bool sketch_params: (scale: float, length: float, randomness: float) snap: bool or None transform:Transformurl: str urls: list of str or None visible: bool zorder: float
- set_facecolor(c)[source]#
Set the facecolor(s) of the
FeatureArtist. If set to ‘never’ then subsequent calls will have no effect. Otherwise works the same asmatplotlib.collections.Collection.set_facecolor.