matplotlib.projections.geo#

class matplotlib.projections.geo.AitoffAxes(*args, **kwargs)[源码]#

基类: GeoAxes

在图中构建一个 Axes。

参数:
figFigure

此坐标系对象在 Figure fig 中构建。

*args

*args 可以是单个 (left, bottom, width, height) 矩形或单个 Bbox。这指定了坐标系在图(Figure)坐标中的位置矩形。

*args 也可以由三个数字或一个三位数字组成;在后一种情况下,这些数字被视为独立的数字。这些数字被解释为 (nrows, ncols, index)(nrows, ncols) 指定子图数组的大小,index 是所创建子图的从1开始的索引。最后,*args 也可以直接是一个 SubplotSpec 实例。

sharex, shareyAxes,可选

x 或 y 与输入 Axes 中的 x 或 y 轴共享。请注意,无法取消轴共享。

frameonbool,默认值:True

Axes 框架是否可见。

box_aspectfloat,可选

为坐标系框设置固定宽高比,即高与宽之比。详见 set_box_aspect

forward_navigation_eventsbool 或 "auto",默认值:"auto"

控制平移/缩放事件是否传递给其下方的 Axes。"auto" 表示对于具有不可见补丁的轴为 True,否则为 False

**kwargs

其他可选关键字参数

属性

描述

adjustable

{'box', 'datalim'}

agg_filter

一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组以及图像左下角的两个偏移量

alpha

浮点数或 None

anchor

(float, float) 或 {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}

animated

布尔值

aspect

{'auto', 'equal'} 或 float

autoscale_on

布尔值

autoscalex_on

未知

autoscaley_on

未知

axes_locator

Callable[[Axes, Renderer], Bbox]

axisbelow

布尔值 或 'line'

box_aspect

浮点数或 None

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

facecolorfc

color

figure

FigureSubFigure

forward_navigation_events

bool 或 "auto"

frame_on

布尔值

gid

字符串

in_layout

布尔值

label

对象

mouseover

布尔值

navigate

布尔值

navigate_mode

未知

path_effects

AbstractPathEffect 列表

picker

None 或 布尔值 或 浮点数 或 可调用对象

position

[left, bottom, width, height] 或 Bbox

prop_cycle

Cycler

rasterization_zorder

浮点数或 None

rasterized

布尔值

sketch_params

(scale: 浮点数, length: 浮点数, randomness: 浮点数)

snap

布尔值或 None

subplotspec

未知

title

字符串

transform

变换

url

字符串

visible

布尔值

xbound

(lower: float, upper: float)

xlabel

字符串

xlim

(left: float, right: float)

xmargin

float 大于 -0.5

xscale

未知

xticklabels

未知

xticks

未知

ybound

(lower: float, upper: float)

ylabel

字符串

ylim

(bottom: float, top: float)

ymargin

float 大于 -0.5

yscale

未知

yticklabels

未知

yticks

未知

zorder

浮点数

返回:
坐标系

新的 Axes 对象。

class AitoffTransform(resolution)[源码]#

基类: _GeoTransform

Aitoff 基本变换。

创建一个新的地理变换。

分辨率是每个输入线段之间插值的步数,以近似其在弯曲空间中的路径。

has_inverse = True#

如果此变换具有相应的逆变换,则为 True。

inverted()[源码]#

返回相应的逆变换。

它满足 x == self.inverted().transform(self.transform(x))

此方法的返回值应被视为临时值。对 self 的更新不会导致其逆副本的相应更新。

transform_non_affine(values)[源码]#

仅应用此变换的非仿射部分。

transform(values) 始终等价于 transform_affine(transform_non_affine(values))

在非仿射变换中,这通常等价于 transform(values)。在仿射变换中,这始终是一个空操作。

参数:
values数组

输入值,作为长度为 input_dims 的数组或形状为 (N, input_dims) 的数组。

返回:
数组

输出值,作为长度为 output_dims 的数组或形状为 (N, output_dims) 的数组,取决于输入。

class InvertedAitoffTransform(resolution)[源码]#

基类: _GeoTransform

创建一个新的地理变换。

分辨率是每个输入线段之间插值的步数,以近似其在弯曲空间中的路径。

has_inverse = True#

如果此变换具有相应的逆变换,则为 True。

inverted()[源码]#

返回相应的逆变换。

它满足 x == self.inverted().transform(self.transform(x))

此方法的返回值应被视为临时值。对 self 的更新不会导致其逆副本的相应更新。

transform_non_affine(values)[源码]#

仅应用此变换的非仿射部分。

transform(values) 始终等价于 transform_affine(transform_non_affine(values))

在非仿射变换中,这通常等价于 transform(values)。在仿射变换中,这始终是一个空操作。

参数:
values数组

输入值,作为长度为 input_dims 的数组或形状为 (N, input_dims) 的数组。

返回:
数组

输出值,作为长度为 output_dims 的数组或形状为 (N, output_dims) 的数组,取决于输入。

name = 'aitoff'#
set(*, adjustable=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, anchor=<UNSET>, animated=<UNSET>, aspect=<UNSET>, autoscale_on=<UNSET>, autoscalex_on=<UNSET>, autoscaley_on=<UNSET>, axes_locator=<UNSET>, axisbelow=<UNSET>, box_aspect=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, facecolor=<UNSET>, forward_navigation_events=<UNSET>, frame_on=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, latitude_grid=<UNSET>, longitude_grid=<UNSET>, longitude_grid_ends=<UNSET>, mouseover=<UNSET>, navigate=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, prop_cycle=<UNSET>, rasterization_zorder=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, subplotspec=<UNSET>, title=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, xbound=<UNSET>, xlabel=<UNSET>, xlim=<UNSET>, xmargin=<UNSET>, xscale=<UNSET>, xticklabels=<UNSET>, xticks=<UNSET>, ybound=<UNSET>, ylabel=<UNSET>, ylim=<UNSET>, ymargin=<UNSET>, yscale=<UNSET>, yticklabels=<UNSET>, yticks=<UNSET>, zorder=<UNSET>)[源码]#

一次性设置多个属性。

支持的属性包括:

属性

描述

adjustable

{'box', 'datalim'}

agg_filter

一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组以及图像左下角的两个偏移量

alpha

浮点数或 None

anchor

(float, float) 或 {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}

animated

布尔值

aspect

{'auto', 'equal'} 或 float

autoscale_on

布尔值

autoscalex_on

未知

autoscaley_on

未知

axes_locator

Callable[[Axes, Renderer], Bbox]

axisbelow

布尔值 或 'line'

box_aspect

浮点数或 None

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

facecolorfc

color

figure

FigureSubFigure

forward_navigation_events

bool 或 "auto"

frame_on

布尔值

gid

字符串

in_layout

布尔值

label

对象

latitude_grid

未知

longitude_grid

未知

longitude_grid_ends

未知

mouseover

布尔值

navigate

布尔值

navigate_mode

未知

path_effects

AbstractPathEffect 列表

picker

None 或 布尔值 或 浮点数 或 可调用对象

position

[left, bottom, width, height] 或 Bbox

prop_cycle

Cycler

rasterization_zorder

浮点数或 None

rasterized

布尔值

sketch_params

(scale: 浮点数, length: 浮点数, randomness: 浮点数)

snap

布尔值或 None

subplotspec

未知

title

字符串

transform

变换

url

字符串

visible

布尔值

xbound

未知

xlabel

字符串

xlim

未知

xmargin

float 大于 -0.5

xscale

未知

xticklabels

未知

xticks

未知

ybound

未知

ylabel

字符串

ylim

未知

ymargin

float 大于 -0.5

yscale

未知

yticklabels

未知

yticks

未知

zorder

浮点数

class matplotlib.projections.geo.GeoAxes(fig, *args, facecolor=None, frameon=True, sharex=None, sharey=None, label='', xscale=None, yscale=None, box_aspect=None, forward_navigation_events='auto', **kwargs)[源码]#

基类: Axes

地理投影的抽象基类。

在图中构建一个 Axes。

参数:
figFigure

此坐标系对象在 Figure fig 中构建。

*args

*args 可以是单个 (left, bottom, width, height) 矩形或单个 Bbox。这指定了坐标系在图(Figure)坐标中的位置矩形。

*args 也可以由三个数字或一个三位数字组成;在后一种情况下,这些数字被视为独立的数字。这些数字被解释为 (nrows, ncols, index)(nrows, ncols) 指定子图数组的大小,index 是所创建子图的从1开始的索引。最后,*args 也可以直接是一个 SubplotSpec 实例。

sharex, shareyAxes,可选

x 或 y 与输入 Axes 中的 x 或 y 轴共享。请注意,无法取消轴共享。

frameonbool,默认值:True

Axes 框架是否可见。

box_aspectfloat,可选

为坐标系框设置固定宽高比,即高与宽之比。详见 set_box_aspect

forward_navigation_eventsbool 或 "auto",默认值:"auto"

控制平移/缩放事件是否传递给其下方的 Axes。"auto" 表示对于具有不可见补丁的轴为 True,否则为 False

**kwargs

其他可选关键字参数

属性

描述

adjustable

{'box', 'datalim'}

agg_filter

一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组以及图像左下角的两个偏移量

alpha

浮点数或 None

anchor

(float, float) 或 {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}

animated

布尔值

aspect

{'auto', 'equal'} 或 float

autoscale_on

布尔值

autoscalex_on

未知

autoscaley_on

未知

axes_locator

Callable[[Axes, Renderer], Bbox]

axisbelow

布尔值 或 'line'

box_aspect

浮点数或 None

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

facecolorfc

color

figure

FigureSubFigure

forward_navigation_events

bool 或 "auto"

frame_on

布尔值

gid

字符串

in_layout

布尔值

label

对象

mouseover

布尔值

navigate

布尔值

navigate_mode

未知

path_effects

AbstractPathEffect 列表

picker

None 或 布尔值 或 浮点数 或 可调用对象

position

[left, bottom, width, height] 或 Bbox

prop_cycle

Cycler

rasterization_zorder

浮点数或 None

rasterized

布尔值

sketch_params

(scale: 浮点数, length: 浮点数, randomness: 浮点数)

snap

布尔值或 None

subplotspec

未知

title

字符串

transform

变换

url

字符串

visible

布尔值

xbound

(lower: float, upper: float)

xlabel

字符串

xlim

(left: float, right: float)

xmargin

float 大于 -0.5

xscale

未知

xticklabels

未知

xticks

未知

ybound

(lower: float, upper: float)

ylabel

字符串

ylim

(bottom: float, top: float)

ymargin

float 大于 -0.5

yscale

未知

yticklabels

未知

yticks

未知

zorder

浮点数

返回:
坐标系

新的 Axes 对象。

RESOLUTION = 75#
class ThetaFormatter(round_to=1.0)[源码]#

基类: Formatter

用于格式化 theta 刻度标签。将弧度的原始单位转换为度并添加度数符号。

can_pan()[源码]#

返回此坐标系是否支持平移/缩放按钮功能。

此坐标系对象不支持交互式平移/缩放。

can_zoom()[源码]#

返回此 Axes 是否支持缩放框按钮功能。

此坐标系对象不支持交互式缩放框。

clear()[源码]#

清除 Axes。

drag_pan(button, key, x, y)[源码]#

在平移操作期间鼠标移动时调用。

参数:
buttonMouseButton

按下的鼠标按钮。

keystr 或 None

按下的键(如果有)。

x, y浮点数

显示坐标中的鼠标坐标。

备注

这旨在由新的投影类型覆盖。

end_pan()[源码]#

当平移操作完成时调用(鼠标按钮松开时)。

备注

这旨在由新的投影类型覆盖。

format_coord(lon, lat)[源码]#

返回格式化坐标的格式字符串。

get_data_ratio()[源码]#

返回数据本身的宽高比。

get_xaxis_text1_transform(pad)[源码]#
返回:
transform变换

用于绘制 x 轴标签的变换,它将在轴和标签之间添加 pad_points(以点为单位)的填充。x 方向使用数据坐标,y 方向使用轴坐标。

valign{'center', 'top', 'bottom', 'baseline', 'center_baseline'}

文本的垂直对齐方式。

halign{'center', 'left', 'right'}

文本的水平对齐方式。

备注

此变换主要由 Axis 类使用,旨在被可能需要在不同位置放置轴元素的新型投影覆盖。

get_xaxis_text2_transform(pad)[源码]#
返回:
transform变换

用于绘制次要 x 轴标签的变换,它将在轴和标签之间添加 pad_points 点的填充。x 方向是数据坐标,y 方向是轴坐标。

valign{'center', 'top', 'bottom', 'baseline', 'center_baseline'}

文本的垂直对齐方式。

halign{'center', 'left', 'right'}

文本的水平对齐方式。

备注

此变换主要由 Axis 类使用,旨在被可能需要在不同位置放置轴元素的新型投影覆盖。

get_xaxis_transform(which='grid')[源码]#

获取用于绘制X轴标签、刻度线和网格线的变换。X方向采用数据坐标,Y方向采用坐标轴坐标。

注意

此变换主要由 Axis 类使用,旨在被可能需要在不同位置放置轴元素的新型投影覆盖。

参数:
which{'grid', 'tick1', 'tick2'}
get_yaxis_text1_transform(pad)[源码]#
返回:
transform变换

用于绘制 y 轴标签的变换,该变换会在坐标轴和标签之间添加 pad_points(以点为单位)的填充。x 方向使用坐标轴坐标,y 方向使用数据坐标。

valign{'center', 'top', 'bottom', 'baseline', 'center_baseline'}

文本的垂直对齐方式。

halign{'center', 'left', 'right'}

文本的水平对齐方式。

备注

此变换主要由 Axis 类使用,旨在被可能需要在不同位置放置轴元素的新型投影覆盖。

get_yaxis_text2_transform(pad)[源码]#
返回:
transform变换

用于绘制次要y轴标签的变换,它会在轴和标签之间添加 *pad_points* 点(以点为单位)的填充。x方向使用轴坐标,y方向使用数据坐标。

valign{'center', 'top', 'bottom', 'baseline', 'center_baseline'}

文本的垂直对齐方式。

halign{'center', 'left', 'right'}

文本的水平对齐方式。

备注

此变换主要由 Axis 类使用,旨在被可能需要在不同位置放置轴元素的新型投影覆盖。

get_yaxis_transform(which='grid')[源码]#

获取用于绘制y轴标签、刻度线和网格线的变换。x方向是轴坐标,y方向是数据坐标。

注意

此变换主要由 Axis 类使用,旨在被可能需要在不同位置放置轴元素的新型投影覆盖。

参数:
which{'grid', 'tick1', 'tick2'}
invert_xaxis()[源码]#

不支持。请考虑使用 Cartopy。

invert_yaxis()[源码]#

不支持。请考虑使用 Cartopy。

set(*, adjustable=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, anchor=<UNSET>, animated=<UNSET>, aspect=<UNSET>, autoscale_on=<UNSET>, autoscalex_on=<UNSET>, autoscaley_on=<UNSET>, axes_locator=<UNSET>, axisbelow=<UNSET>, box_aspect=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, facecolor=<UNSET>, forward_navigation_events=<UNSET>, frame_on=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, latitude_grid=<UNSET>, longitude_grid=<UNSET>, longitude_grid_ends=<UNSET>, mouseover=<UNSET>, navigate=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, prop_cycle=<UNSET>, rasterization_zorder=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, subplotspec=<UNSET>, title=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, xbound=<UNSET>, xlabel=<UNSET>, xlim=<UNSET>, xmargin=<UNSET>, xscale=<UNSET>, xticklabels=<UNSET>, xticks=<UNSET>, ybound=<UNSET>, ylabel=<UNSET>, ylim=<UNSET>, ymargin=<UNSET>, yscale=<UNSET>, yticklabels=<UNSET>, yticks=<UNSET>, zorder=<UNSET>)[source]#

一次性设置多个属性。

支持的属性包括:

属性

描述

adjustable

{'box', 'datalim'}

agg_filter

一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组以及图像左下角的两个偏移量

alpha

浮点数或 None

anchor

(float, float) 或 {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}

animated

布尔值

aspect

{'auto', 'equal'} 或 float

autoscale_on

布尔值

autoscalex_on

未知

autoscaley_on

未知

axes_locator

Callable[[Axes, Renderer], Bbox]

axisbelow

布尔值 或 'line'

box_aspect

浮点数或 None

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

facecolorfc

color

figure

FigureSubFigure

forward_navigation_events

bool 或 "auto"

frame_on

布尔值

gid

字符串

in_layout

布尔值

label

对象

latitude_grid

未知

longitude_grid

未知

longitude_grid_ends

未知

mouseover

布尔值

navigate

布尔值

navigate_mode

未知

path_effects

AbstractPathEffect 列表

picker

None 或 布尔值 或 浮点数 或 可调用对象

position

[left, bottom, width, height] 或 Bbox

prop_cycle

Cycler

rasterization_zorder

浮点数或 None

rasterized

布尔值

sketch_params

(scale: 浮点数, length: 浮点数, randomness: 浮点数)

snap

布尔值或 None

subplotspec

未知

title

字符串

transform

变换

url

字符串

visible

布尔值

xbound

未知

xlabel

字符串

xlim

未知

xmargin

float 大于 -0.5

xscale

未知

xticklabels

未知

xticks

未知

ybound

未知

ylabel

字符串

ylim

未知

ymargin

float 大于 -0.5

yscale

未知

yticklabels

未知

yticks

未知

zorder

浮点数

set_latitude_grid(degrees)[source]#

设置每条纬线网格之间的度数。

set_longitude_grid(degrees)[source]#

设置每条经线网格之间的度数。

set_longitude_grid_ends(degrees)[source]#

设置停止绘制经线网格的纬度。

set_xbound(*args, **kwargs)[source]#

不支持。请考虑使用 Cartopy。

set_xlim(*args, **kwargs)[source]#

不支持。请考虑使用 Cartopy。

set_xscale(*args, **kwargs)[source]#

设置 x 轴的比例。

参数:
字符串或 ScaleBase

要应用的轴刻度类型。有效的字符串值是刻度类(“linear”、“log”、“function”等)的名称。这些可以是任何内置刻度的名称,也可以是通过matplotlib.scale.register_scale注册的任何自定义刻度的名称。

**kwargs

如果 value 是字符串,则关键字参数将传递给相应类的实例化方法。

set_ybound(*args, **kwargs)[source]#

不支持。请考虑使用 Cartopy。

set_ylim(*args, **kwargs)[source]#

不支持。请考虑使用 Cartopy。

set_yscale(*args, **kwargs)[source]#

设置 y 轴的比例。

参数:
字符串或 ScaleBase

要应用的轴刻度类型。有效的字符串值是刻度类(“linear”、“log”、“function”等)的名称。这些可以是任何内置刻度的名称,也可以是通过matplotlib.scale.register_scale注册的任何自定义刻度的名称。

**kwargs

如果 value 是字符串,则关键字参数将传递给相应类的实例化方法。

start_pan(x, y, button)[source]#

当平移操作开始时调用。

参数:
x, y浮点数

显示坐标中的鼠标坐标。

buttonMouseButton

按下的鼠标按钮。

备注

这旨在由新的投影类型覆盖。

class matplotlib.projections.geo.HammerAxes(*args, **kwargs)[source]#

基类: GeoAxes

在图中构建一个 Axes。

参数:
figFigure

此坐标系对象在 Figure fig 中构建。

*args

*args 可以是单个 (left, bottom, width, height) 矩形或单个 Bbox。这指定了坐标系在图(Figure)坐标中的位置矩形。

*args 也可以由三个数字或一个三位数字组成;在后一种情况下,这些数字被视为独立的数字。这些数字被解释为 (nrows, ncols, index)(nrows, ncols) 指定子图数组的大小,index 是所创建子图的从1开始的索引。最后,*args 也可以直接是一个 SubplotSpec 实例。

sharex, shareyAxes,可选

x 或 y 与输入 Axes 中的 x 或 y 轴共享。请注意,无法取消轴共享。

frameonbool,默认值:True

Axes 框架是否可见。

box_aspectfloat,可选

为坐标系框设置固定宽高比,即高与宽之比。详见 set_box_aspect

forward_navigation_eventsbool 或 "auto",默认值:"auto"

控制平移/缩放事件是否传递给其下方的 Axes。"auto" 表示对于具有不可见补丁的轴为 True,否则为 False

**kwargs

其他可选关键字参数

属性

描述

adjustable

{'box', 'datalim'}

agg_filter

一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组以及图像左下角的两个偏移量

alpha

浮点数或 None

anchor

(float, float) 或 {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}

animated

布尔值

aspect

{'auto', 'equal'} 或 float

autoscale_on

布尔值

autoscalex_on

未知

autoscaley_on

未知

axes_locator

Callable[[Axes, Renderer], Bbox]

axisbelow

布尔值 或 'line'

box_aspect

浮点数或 None

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

facecolorfc

color

figure

FigureSubFigure

forward_navigation_events

bool 或 "auto"

frame_on

布尔值

gid

字符串

in_layout

布尔值

label

对象

mouseover

布尔值

navigate

布尔值

navigate_mode

未知

path_effects

AbstractPathEffect 列表

picker

None 或 布尔值 或 浮点数 或 可调用对象

position

[left, bottom, width, height] 或 Bbox

prop_cycle

Cycler

rasterization_zorder

浮点数或 None

rasterized

布尔值

sketch_params

(scale: 浮点数, length: 浮点数, randomness: 浮点数)

snap

布尔值或 None

subplotspec

未知

title

字符串

transform

变换

url

字符串

visible

布尔值

xbound

(lower: float, upper: float)

xlabel

字符串

xlim

(left: float, right: float)

xmargin

float 大于 -0.5

xscale

未知

xticklabels

未知

xticks

未知

ybound

(lower: float, upper: float)

ylabel

字符串

ylim

(bottom: float, top: float)

ymargin

float 大于 -0.5

yscale

未知

yticklabels

未知

yticks

未知

zorder

浮点数

返回:
坐标系

新的 Axes 对象。

class HammerTransform(resolution)[source]#

基类: _GeoTransform

基础 Hammer 变换。

创建一个新的地理变换。

分辨率是每个输入线段之间插值的步数,以近似其在弯曲空间中的路径。

has_inverse = True#

如果此变换具有相应的逆变换,则为 True。

inverted()[source]#

返回相应的逆变换。

它满足 x == self.inverted().transform(self.transform(x))

此方法的返回值应被视为临时值。对 self 的更新不会导致其逆副本的相应更新。

transform_non_affine(values)[source]#

仅应用此变换的非仿射部分。

transform(values) 始终等价于 transform_affine(transform_non_affine(values))

在非仿射变换中,这通常等价于 transform(values)。在仿射变换中,这始终是一个空操作。

参数:
values数组

输入值,作为长度为 input_dims 的数组或形状为 (N, input_dims) 的数组。

返回:
数组

输出值,作为长度为 output_dims 的数组或形状为 (N, output_dims) 的数组,取决于输入。

class InvertedHammerTransform(resolution)[source]#

基类: _GeoTransform

创建一个新的地理变换。

分辨率是每个输入线段之间插值的步数,以近似其在弯曲空间中的路径。

has_inverse = True#

如果此变换具有相应的逆变换,则为 True。

inverted()[source]#

返回相应的逆变换。

它满足 x == self.inverted().transform(self.transform(x))

此方法的返回值应被视为临时值。对 self 的更新不会导致其逆副本的相应更新。

transform_non_affine(values)[source]#

仅应用此变换的非仿射部分。

transform(values) 始终等价于 transform_affine(transform_non_affine(values))

在非仿射变换中,这通常等价于 transform(values)。在仿射变换中,这始终是一个空操作。

参数:
values数组

输入值,作为长度为 input_dims 的数组或形状为 (N, input_dims) 的数组。

返回:
数组

输出值,作为长度为 output_dims 的数组或形状为 (N, output_dims) 的数组,取决于输入。

name = 'hammer'#
set(*, adjustable=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, anchor=<UNSET>, animated=<UNSET>, aspect=<UNSET>, autoscale_on=<UNSET>, autoscalex_on=<UNSET>, autoscaley_on=<UNSET>, axes_locator=<UNSET>, axisbelow=<UNSET>, box_aspect=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, facecolor=<UNSET>, forward_navigation_events=<UNSET>, frame_on=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, latitude_grid=<UNSET>, longitude_grid=<UNSET>, longitude_grid_ends=<UNSET>, mouseover=<UNSET>, navigate=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, prop_cycle=<UNSET>, rasterization_zorder=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, subplotspec=<UNSET>, title=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, xbound=<UNSET>, xlabel=<UNSET>, xlim=<UNSET>, xmargin=<UNSET>, xscale=<UNSET>, xticklabels=<UNSET>, xticks=<UNSET>, ybound=<UNSET>, ylabel=<UNSET>, ylim=<UNSET>, ymargin=<UNSET>, yscale=<UNSET>, yticklabels=<UNSET>, yticks=<UNSET>, zorder=<UNSET>)[source]#

一次性设置多个属性。

支持的属性包括:

属性

描述

adjustable

{'box', 'datalim'}

agg_filter

一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组以及图像左下角的两个偏移量

alpha

浮点数或 None

anchor

(float, float) 或 {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}

animated

布尔值

aspect

{'auto', 'equal'} 或 float

autoscale_on

布尔值

autoscalex_on

未知

autoscaley_on

未知

axes_locator

Callable[[Axes, Renderer], Bbox]

axisbelow

布尔值 或 'line'

box_aspect

浮点数或 None

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

facecolorfc

color

figure

FigureSubFigure

forward_navigation_events

bool 或 "auto"

frame_on

布尔值

gid

字符串

in_layout

布尔值

label

对象

latitude_grid

未知

longitude_grid

未知

longitude_grid_ends

未知

mouseover

布尔值

navigate

布尔值

navigate_mode

未知

path_effects

AbstractPathEffect 列表

picker

None 或 布尔值 或 浮点数 或 可调用对象

position

[left, bottom, width, height] 或 Bbox

prop_cycle

Cycler

rasterization_zorder

浮点数或 None

rasterized

布尔值

sketch_params

(scale: 浮点数, length: 浮点数, randomness: 浮点数)

snap

布尔值或 None

subplotspec

未知

title

字符串

transform

变换

url

字符串

visible

布尔值

xbound

未知

xlabel

字符串

xlim

未知

xmargin

float 大于 -0.5

xscale

未知

xticklabels

未知

xticks

未知

ybound

未知

ylabel

字符串

ylim

未知

ymargin

float 大于 -0.5

yscale

未知

yticklabels

未知

yticks

未知

zorder

浮点数

class matplotlib.projections.geo.LambertAxes(*args, center_longitude=0, center_latitude=0, **kwargs)[source]#

基类: GeoAxes

在图中构建一个 Axes。

参数:
figFigure

此坐标系对象在 Figure fig 中构建。

*args

*args 可以是单个 (left, bottom, width, height) 矩形或单个 Bbox。这指定了坐标系在图(Figure)坐标中的位置矩形。

*args 也可以由三个数字或一个三位数字组成;在后一种情况下,这些数字被视为独立的数字。这些数字被解释为 (nrows, ncols, index)(nrows, ncols) 指定子图数组的大小,index 是所创建子图的从1开始的索引。最后,*args 也可以直接是一个 SubplotSpec 实例。

sharex, shareyAxes,可选

x 或 y 与输入 Axes 中的 x 或 y 轴共享。请注意,无法取消轴共享。

frameonbool,默认值:True

Axes 框架是否可见。

box_aspectfloat,可选

为坐标系框设置固定宽高比,即高与宽之比。详见 set_box_aspect

forward_navigation_eventsbool 或 "auto",默认值:"auto"

控制平移/缩放事件是否传递给其下方的 Axes。"auto" 表示对于具有不可见补丁的轴为 True,否则为 False

**kwargs

其他可选关键字参数

属性

描述

adjustable

{'box', 'datalim'}

agg_filter

一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组以及图像左下角的两个偏移量

alpha

浮点数或 None

anchor

(float, float) 或 {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}

animated

布尔值

aspect

{'auto', 'equal'} 或 float

autoscale_on

布尔值

autoscalex_on

未知

autoscaley_on

未知

axes_locator

Callable[[Axes, Renderer], Bbox]

axisbelow

布尔值 或 'line'

box_aspect

浮点数或 None

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

facecolorfc

color

figure

FigureSubFigure

forward_navigation_events

bool 或 "auto"

frame_on

布尔值

gid

字符串

in_layout

布尔值

label

对象

mouseover

布尔值

navigate

布尔值

navigate_mode

未知

path_effects

AbstractPathEffect 列表

picker

None 或 布尔值 或 浮点数 或 可调用对象

position

[left, bottom, width, height] 或 Bbox

prop_cycle

Cycler

rasterization_zorder

浮点数或 None

rasterized

布尔值

sketch_params

(scale: 浮点数, length: 浮点数, randomness: 浮点数)

snap

布尔值或 None

subplotspec

未知

title

字符串

transform

变换

url

字符串

visible

布尔值

xbound

(lower: float, upper: float)

xlabel

字符串

xlim

(left: float, right: float)

xmargin

float 大于 -0.5

xscale

未知

xticklabels

未知

xticks

未知

ybound

(lower: float, upper: float)

ylabel

字符串

ylim

(bottom: float, top: float)

ymargin

float 大于 -0.5

yscale

未知

yticklabels

未知

yticks

未知

zorder

浮点数

返回:
坐标系

新的 Axes 对象。

class InvertedLambertTransform(center_longitude, center_latitude, resolution)[source]#

基类: _GeoTransform

创建一个新的地理变换。

分辨率是每个输入线段之间插值的步数,以近似其在弯曲空间中的路径。

has_inverse = True#

如果此变换具有相应的逆变换,则为 True。

inverted()[source]#

返回相应的逆变换。

它满足 x == self.inverted().transform(self.transform(x))

此方法的返回值应被视为临时值。对 self 的更新不会导致其逆副本的相应更新。

transform_non_affine(values)[source]#

仅应用此变换的非仿射部分。

transform(values) 始终等价于 transform_affine(transform_non_affine(values))

在非仿射变换中,这通常等价于 transform(values)。在仿射变换中,这始终是一个空操作。

参数:
values数组

输入值,作为长度为 input_dims 的数组或形状为 (N, input_dims) 的数组。

返回:
数组

输出值,作为长度为 output_dims 的数组或形状为 (N, output_dims) 的数组,取决于输入。

class LambertTransform(center_longitude, center_latitude, resolution)[source]#

基类: _GeoTransform

基础 Lambert 变换。

创建一个新的 Lambert 变换。分辨率是指在每个输入线段之间进行插值的步数,以近似其在弯曲 Lambert 空间中的路径。

has_inverse = True#

如果此变换具有相应的逆变换,则为 True。

inverted()[source]#

返回相应的逆变换。

它满足 x == self.inverted().transform(self.transform(x))

此方法的返回值应被视为临时值。对 self 的更新不会导致其逆副本的相应更新。

transform_non_affine(values)[source]#

仅应用此变换的非仿射部分。

transform(values) 始终等价于 transform_affine(transform_non_affine(values))

在非仿射变换中,这通常等价于 transform(values)。在仿射变换中,这始终是一个空操作。

参数:
values数组

输入值,作为长度为 input_dims 的数组或形状为 (N, input_dims) 的数组。

返回:
数组

输出值,作为长度为 output_dims 的数组或形状为 (N, output_dims) 的数组,取决于输入。

clear()[source]#

清除 Axes。

name = 'lambert'#
set(*, adjustable=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, anchor=<UNSET>, animated=<UNSET>, aspect=<UNSET>, autoscale_on=<UNSET>, autoscalex_on=<UNSET>, autoscaley_on=<UNSET>, axes_locator=<UNSET>, axisbelow=<UNSET>, box_aspect=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, facecolor=<UNSET>, forward_navigation_events=<UNSET>, frame_on=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, latitude_grid=<UNSET>, longitude_grid=<UNSET>, longitude_grid_ends=<UNSET>, mouseover=<UNSET>, navigate=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, prop_cycle=<UNSET>, rasterization_zorder=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, subplotspec=<UNSET>, title=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, xbound=<UNSET>, xlabel=<UNSET>, xlim=<UNSET>, xmargin=<UNSET>, xscale=<UNSET>, xticklabels=<UNSET>, xticks=<UNSET>, ybound=<UNSET>, ylabel=<UNSET>, ylim=<UNSET>, ymargin=<UNSET>, yscale=<UNSET>, yticklabels=<UNSET>, yticks=<UNSET>, zorder=<UNSET>)[source]#

一次性设置多个属性。

支持的属性包括:

属性

描述

adjustable

{'box', 'datalim'}

agg_filter

一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组以及图像左下角的两个偏移量

alpha

浮点数或 None

anchor

(float, float) 或 {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}

animated

布尔值

aspect

{'auto', 'equal'} 或 float

autoscale_on

布尔值

autoscalex_on

未知

autoscaley_on

未知

axes_locator

Callable[[Axes, Renderer], Bbox]

axisbelow

布尔值 或 'line'

box_aspect

浮点数或 None

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

facecolorfc

color

figure

FigureSubFigure

forward_navigation_events

bool 或 "auto"

frame_on

布尔值

gid

字符串

in_layout

布尔值

label

对象

latitude_grid

未知

longitude_grid

未知

longitude_grid_ends

未知

mouseover

布尔值

navigate

布尔值

navigate_mode

未知

path_effects

AbstractPathEffect 列表

picker

None 或 布尔值 或 浮点数 或 可调用对象

position

[left, bottom, width, height] 或 Bbox

prop_cycle

Cycler

rasterization_zorder

浮点数或 None

rasterized

布尔值

sketch_params

(scale: 浮点数, length: 浮点数, randomness: 浮点数)

snap

布尔值或 None

subplotspec

未知

title

字符串

transform

变换

url

字符串

visible

布尔值

xbound

未知

xlabel

字符串

xlim

未知

xmargin

float 大于 -0.5

xscale

未知

xticklabels

未知

xticks

未知

ybound

未知

ylabel

字符串

ylim

未知

ymargin

float 大于 -0.5

yscale

未知

yticklabels

未知

yticks

未知

zorder

浮点数

class matplotlib.projections.geo.MollweideAxes(*args, **kwargs)[source]#

基类: GeoAxes

在图中构建一个 Axes。

参数:
figFigure

此坐标系对象在 Figure fig 中构建。

*args

*args 可以是单个 (left, bottom, width, height) 矩形或单个 Bbox。这指定了坐标系在图(Figure)坐标中的位置矩形。

*args 也可以由三个数字或一个三位数字组成;在后一种情况下,这些数字被视为独立的数字。这些数字被解释为 (nrows, ncols, index)(nrows, ncols) 指定子图数组的大小,index 是所创建子图的从1开始的索引。最后,*args 也可以直接是一个 SubplotSpec 实例。

sharex, shareyAxes,可选

x 或 y 与输入 Axes 中的 x 或 y 轴共享。请注意,无法取消轴共享。

frameonbool,默认值:True

Axes 框架是否可见。

box_aspectfloat,可选

为坐标系框设置固定宽高比,即高与宽之比。详见 set_box_aspect

forward_navigation_eventsbool 或 "auto",默认值:"auto"

控制平移/缩放事件是否传递给其下方的 Axes。"auto" 表示对于具有不可见补丁的轴为 True,否则为 False

**kwargs

其他可选关键字参数

属性

描述

adjustable

{'box', 'datalim'}

agg_filter

一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组以及图像左下角的两个偏移量

alpha

浮点数或 None

anchor

(float, float) 或 {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}

animated

布尔值

aspect

{'auto', 'equal'} 或 float

autoscale_on

布尔值

autoscalex_on

未知

autoscaley_on

未知

axes_locator

Callable[[Axes, Renderer], Bbox]

axisbelow

布尔值 或 'line'

box_aspect

浮点数或 None

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

facecolorfc

color

figure

FigureSubFigure

forward_navigation_events

bool 或 "auto"

frame_on

布尔值

gid

字符串

in_layout

布尔值

label

对象

mouseover

布尔值

navigate

布尔值

navigate_mode

未知

path_effects

AbstractPathEffect 列表

picker

None 或 布尔值 或 浮点数 或 可调用对象

position

[left, bottom, width, height] 或 Bbox

prop_cycle

Cycler

rasterization_zorder

浮点数或 None

rasterized

布尔值

sketch_params

(scale: 浮点数, length: 浮点数, randomness: 浮点数)

snap

布尔值或 None

subplotspec

未知

title

字符串

transform

变换

url

字符串

visible

布尔值

xbound

(lower: float, upper: float)

xlabel

字符串

xlim

(left: float, right: float)

xmargin

float 大于 -0.5

xscale

未知

xticklabels

未知

xticks

未知

ybound

(lower: float, upper: float)

ylabel

字符串

ylim

(bottom: float, top: float)

ymargin

float 大于 -0.5

yscale

未知

yticklabels

未知

yticks

未知

zorder

浮点数

返回:
坐标系

新的 Axes 对象。

class InvertedMollweideTransform(resolution)[source]#

基类: _GeoTransform

创建一个新的地理变换。

分辨率是每个输入线段之间插值的步数,以近似其在弯曲空间中的路径。

has_inverse = True#

如果此变换具有相应的逆变换,则为 True。

inverted()[source]#

返回相应的逆变换。

它满足 x == self.inverted().transform(self.transform(x))

此方法的返回值应被视为临时值。对 self 的更新不会导致其逆副本的相应更新。

transform_non_affine(values)[source]#

仅应用此变换的非仿射部分。

transform(values) 始终等价于 transform_affine(transform_non_affine(values))

在非仿射变换中,这通常等价于 transform(values)。在仿射变换中,这始终是一个空操作。

参数:
values数组

输入值,作为长度为 input_dims 的数组或形状为 (N, input_dims) 的数组。

返回:
数组

输出值,作为长度为 output_dims 的数组或形状为 (N, output_dims) 的数组,取决于输入。

class MollweideTransform(resolution)[source]#

基类: _GeoTransform

基础 Mollweide 变换。

创建一个新的地理变换。

分辨率是每个输入线段之间插值的步数,以近似其在弯曲空间中的路径。

has_inverse = True#

如果此变换具有相应的逆变换,则为 True。

inverted()[source]#

返回相应的逆变换。

它满足 x == self.inverted().transform(self.transform(x))

此方法的返回值应被视为临时值。对 self 的更新不会导致其逆副本的相应更新。

transform_non_affine(values)[source]#

仅应用此变换的非仿射部分。

transform(values) 始终等价于 transform_affine(transform_non_affine(values))

在非仿射变换中,这通常等价于 transform(values)。在仿射变换中,这始终是一个空操作。

参数:
values数组

输入值,作为长度为 input_dims 的数组或形状为 (N, input_dims) 的数组。

返回:
数组

输出值,作为长度为 output_dims 的数组或形状为 (N, output_dims) 的数组,取决于输入。

name = 'mollweide'#
set(*, adjustable=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, anchor=<UNSET>, animated=<UNSET>, aspect=<UNSET>, autoscale_on=<UNSET>, autoscalex_on=<UNSET>, autoscaley_on=<UNSET>, axes_locator=<UNSET>, axisbelow=<UNSET>, box_aspect=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, facecolor=<UNSET>, forward_navigation_events=<UNSET>, frame_on=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, latitude_grid=<UNSET>, longitude_grid=<UNSET>, longitude_grid_ends=<UNSET>, mouseover=<UNSET>, navigate=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, prop_cycle=<UNSET>, rasterization_zorder=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, subplotspec=<UNSET>, title=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, xbound=<UNSET>, xlabel=<UNSET>, xlim=<UNSET>, xmargin=<UNSET>, xscale=<UNSET>, xticklabels=<UNSET>, xticks=<UNSET>, ybound=<UNSET>, ylabel=<UNSET>, ylim=<UNSET>, ymargin=<UNSET>, yscale=<UNSET>, yticklabels=<UNSET>, yticks=<UNSET>, zorder=<UNSET>)[source]#

一次性设置多个属性。

支持的属性包括:

属性

描述

adjustable

{'box', 'datalim'}

agg_filter

一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组以及图像左下角的两个偏移量

alpha

浮点数或 None

anchor

(float, float) 或 {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}

animated

布尔值

aspect

{'auto', 'equal'} 或 float

autoscale_on

布尔值

autoscalex_on

未知

autoscaley_on

未知

axes_locator

Callable[[Axes, Renderer], Bbox]

axisbelow

布尔值 或 'line'

box_aspect

浮点数或 None

clip_box

BboxBase 或 None

clip_on

布尔值

clip_path

Patch 或 (Path, Transform) 或 None

facecolorfc

color

figure

FigureSubFigure

forward_navigation_events

bool 或 "auto"

frame_on

布尔值

gid

字符串

in_layout

布尔值

label

对象

latitude_grid

未知

longitude_grid

未知

longitude_grid_ends

未知

mouseover

布尔值

navigate

布尔值

navigate_mode

未知

path_effects

AbstractPathEffect 列表

picker

None 或 布尔值 或 浮点数 或 可调用对象

position

[left, bottom, width, height] 或 Bbox

prop_cycle

Cycler

rasterization_zorder

浮点数或 None

rasterized

布尔值

sketch_params

(scale: 浮点数, length: 浮点数, randomness: 浮点数)

snap

布尔值或 None

subplotspec

未知

title

字符串

transform

变换

url

字符串

visible

布尔值

xbound

未知

xlabel

字符串

xlim

未知

xmargin

float 大于 -0.5

xscale

未知

xticklabels

未知

xticks

未知

ybound

未知

ylabel

字符串

ylim

未知

ymargin

float 大于 -0.5

yscale

未知

yticklabels

未知

yticks

未知

zorder

浮点数