mpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator#
- 类 mpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator(parent_axes, zoom, loc, borderpad=0.5, bbox_to_anchor=None, bbox_transform=None)[source]#
-
- 参数:
- locstr
框的位置。有效位置包括 'upper left'(左上)、'upper center'(中上)、'upper right'(右上)、'center left'(左中)、'center'(中)、'center right'(右中)、'lower left'(左下)、'lower center'(中下)、'lower right'(右下)。为向后兼容,也接受数值。详情请参阅
Legend
的参数 loc。- padfloat, 默认值:0.4
子项周围的填充,作为字号的一部分。
- borderpadfloat, 默认值:0.5
偏移框边框与 *bbox_to_anchor* 之间的填充。
- child
OffsetBox
将被锚定的框。
- prop
FontProperties
这仅用作填充的参考。如果未提供,则使用
rcParams["legend.fontsize"]
(默认值:'medium'
)。- frameonbool
是否在框周围绘制边框。
- bbox_to_anchor
BboxBase
, 2元组或4元组浮点数 与 *loc* 结合使用,用于定位图例的框。
- bbox_transform无或
matplotlib.transforms.Transform
边界框 (*bbox_to_anchor*) 的变换。
- **kwargs
所有其他参数将传递给
OffsetBox
。
备注
有关锚定机制的详细说明,请参阅
Legend
。- set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, bbox_to_anchor=<UNSET>, child=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, height=<UNSET>, in_layout=<UNSET>, label=<UNSET>, mouseover=<UNSET>, offset=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, width=<UNSET>, zorder=<UNSET>)[source]#
一次性设置多个属性。
支持的属性包括:
属性
描述
一个过滤函数,它接受一个 (m, n, 3) 浮点数组和一个 dpi 值,并返回一个 (m, n, 3) 数组以及图像左下角的两个偏移量
浮点数或 None
布尔值
未知
未知
BboxBase
或 None布尔值
Patch 或 (Path, Transform) 或 None
str
浮点数
布尔值
object
布尔值
(float, float) 或 callable
list of
AbstractPathEffect
None 或 布尔值 或 浮点数 或 可调用对象
布尔值
(scale: 浮点数, length: 浮点数, randomness: 浮点数)
布尔值或 None
str
布尔值
浮点数
浮点数