cartopy.mpl.slippy_image_artist.SlippyImageArtist#
- class cartopy.mpl.slippy_image_artist.SlippyImageArtist(ax, raster_source, **kwargs)[source]#
Bases:
AxesImage
A subclass of
AxesImage
which provides an interface for getting a raster from the given object with interactive slippy map type functionality.Kwargs are passed to the AxesImage constructor.
- Parameters:
norm (
Normalize
(or subclass thereof) or str or None) – The normalizing object which scales data, typically into the interval[0, 1]
. If astr
, aNormalize
subclass is dynamically generated based on the scale with the corresponding name. If None, norm defaults to a colors.Normalize object which initializes its scaling based on the first data processed.cmap (str or
Colormap
) – The colormap used to map normalized data values to RGBA colors.
- draw(renderer, *args, **kwargs)[source]#
Draw the Artist (and its children) using the given renderer.
This has no effect if the artist is not visible (
Artist.get_visible
returns False).- Parameters:
renderer (
RendererBase
subclass.)
Notes
This method is overridden in the Artist subclasses.
- get_window_extent(renderer=None)[source]#
Get the artist’s bounding box in display space.
The bounding box’ width and height are nonnegative.
Subclasses should override for inclusion in the bounding box “tight” calculation. Default is to return an empty bounding box at 0, 0.
Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the Axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly.
- set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, array=<UNSET>, clim=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, cmap=<UNSET>, data=<UNSET>, extent=<UNSET>, filternorm=<UNSET>, filterrad=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, interpolation=<UNSET>, interpolation_stage=<UNSET>, label=<UNSET>, mouseover=<UNSET>, norm=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, resample=<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: float or 2D array-like or None animated: bool array: array-like clim: (vmin: float, vmax: float) clip_box:
BboxBase
or None clip_on: bool clip_path: Patch or (Path, Transform) or None cmap:Colormap
or str or None data: array-like orPIL.Image.Image
extent: 4-tuple of float figure:Figure
filternorm: bool filterrad: positive float gid: str in_layout: bool interpolation: {‘antialiased’, ‘nearest’, ‘bilinear’, ‘bicubic’, ‘spline16’, ‘spline36’, ‘hanning’, ‘hamming’, ‘hermite’, ‘kaiser’, ‘quadric’, ‘catrom’, ‘gaussian’, ‘bessel’, ‘mitchell’, ‘sinc’, ‘lanczos’, ‘none’} or None interpolation_stage: {‘data’, ‘rgba’} or None label: object mouseover: bool norm:Normalize
or str or None path_effects: list ofAbstractPathEffect
picker: None or bool or float or callable rasterized: bool resample: bool or None sketch_params: (scale: float, length: float, randomness: float) snap: bool or None transform:Transform
url: str visible: bool zorder: float