cartopy.mpl.slippy_image_artist.SlippyImageArtist#

class cartopy.mpl.slippy_image_artist.SlippyImageArtist(ax, raster_source, **kwargs)[源代码]#

基类:AxesImage

的子类 AxesImage 它提供了一个接口,用于从给定对象获取格栅,具有交互式滑动地图类型功能。

Kwargs被传递给AxesImage构造函数。

参数:

colorizer (colorizer.Colorizer)

can_composite()[源代码]#

返回图像是否可以与其邻居合成。

draw(renderer, *args, **kwargs)[源代码]#

使用给定的渲染器绘制艺术家(及其孩子)。

如果艺术家不可见,则没有任何影响 (Artist.get_visible 返回False)。

参数:

renderer (RendererBase subclass.)

备注

此方法在Artist子类中被重写。

get_window_extent(renderer=None)[源代码]#

在显示空间中获取艺术家的边界框。

边界框的宽度和高度是非负的。

子类应覆盖以包含在边界框“紧密”计算中。默认值是在0,0处返回一个空的边界框。

使用此功能时请小心,如果艺术家的艺术家窗口范围发生变化,结果不会更新。 范围可能会因变换堆栈中的任何更改而更改,例如更改轴限制、人物大小或使用的画布(正如保存人物时所做的那样)。 这可能会导致意外行为,即交互式图形在屏幕上看起来很好,但保存不正确。

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>)#

一次设置多个属性。

支持的属性有

属性:

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 or PIL.Image.Image extent: 4-tuple of float figure: Figure or SubFigure filternorm: bool filterrad: positive float gid: str in_layout: bool interpolation: {'auto', 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos', 'none'} or None interpolation_stage: {'data', 'rgba', 'auto'} or None label: object mouseover: bool norm: Normalize or str or None path_effects: list of AbstractPathEffect 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