cartopy.mpl.feature_artist.FeatureArtist#

class cartopy.mpl.feature_artist.FeatureArtist(feature, **kwargs)[source]#

Bases: Artist

A subclass of Artist capable of drawing a cartopy.feature.Feature.

Parameters:
  • feature – An instance of cartopy.feature.Feature to draw.

  • styler – A callable that given a gemometry, returns matplotlib styling parameters.

  • **kwargs – Keyword arguments to be used when drawing the feature. These will override those shared with the feature.

draw(renderer, *args, **kwargs)[source]#

Draw the geometries of the feature that intersect with the extent of the cartopy.mpl.geoaxes.GeoAxes instance to which this object has been added.

set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, mouseover=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)#

Set multiple properties at once.

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: scalar or None animated: bool clip_box: Bbox clip_on: bool clip_path: Patch or (Path, Transform) or None figure: Figure gid: str in_layout: bool label: object mouseover: bool path_effects: AbstractPathEffect picker: None or bool or float or callable rasterized: bool sketch_params: (scale: float, length: float, randomness: float) snap: bool or None transform: Transform url: str visible: bool zorder: float