mpl_toolkits.axes_grid1.inset_locator.InsetPosition¶
-
class
mpl_toolkits.axes_grid1.inset_locator.
InsetPosition
(parent, lbwh)[源代码]¶ 基类:
object
用于定位插入轴的对象。
这是通过指定轴中的标准化坐标而不是图形来创建的。
参数: - 起源 :
matplotlib.axes.Axes
matplotlib.axes.Axes
用于规范化坐标的轴。
- lbwh四个浮点数中的一个
插入轴的左边缘、下边缘、宽度和高度,以 起源 轴。
实例
下面将插入轴绑定到具有20%父轴高度和40%宽度的框中。指定轴的大小( [0, 0, 1,1] )确保轴完全填充边界框:
>>> parent_axes = plt.gca() >>> ax_ins = plt.axes([0, 0, 1, 1]) >>> ip = InsetPosition(ax, [0.5, 0.1, 0.4, 0.2]) >>> ax_ins.set_axes_locator(ip)
-
__dict__
= mappingproxy({'__module__': 'mpl_toolkits.axes_grid1.inset_locator', '__init__': <function InsetPosition.__init__>, '__call__': <function InsetPosition.__call__>, '__dict__': <attribute '__dict__' of 'InsetPosition' objects>, '__weakref__': <attribute '__weakref__' of 'InsetPosition' objects>, '__doc__': None, '__annotations__': {}})¶
-
__init__
(parent, lbwh)[源代码]¶ 用于定位插入轴的对象。
这是通过指定轴中的标准化坐标而不是图形来创建的。
参数: - 起源 :
matplotlib.axes.Axes
matplotlib.axes.Axes
用于规范化坐标的轴。
- lbwh四个浮点数中的一个
插入轴的左边缘、下边缘、宽度和高度,以 起源 轴。
实例
下面将插入轴绑定到具有20%父轴高度和40%宽度的框中。指定轴的大小( [0, 0, 1,1] )确保轴完全填充边界框:
>>> parent_axes = plt.gca() >>> ax_ins = plt.axes([0, 0, 1, 1]) >>> ip = InsetPosition(ax, [0.5, 0.1, 0.4, 0.2]) >>> ax_ins.set_axes_locator(ip)
- 起源 :
-
__module__
= 'mpl_toolkits.axes_grid1.inset_locator'¶
-
__weakref__
¶ 对象的弱引用列表(如果已定义)
- 起源 :