matplotlib.axes.Axes.add_艺术家#

Axes.add_artist(a)[源代码]#

将一个 Artist 添加到 Axes 中;返回该 artist。

仅在没有专用“添加”方法的情况下使用 add_artist;如果有必要,使用 update_datalim 等方法手动更新 dataLim,如果艺术家需要包含在自动缩放中。

如果在创建艺术家时未指定 transform``(例如 ``artist.get_transform() == None),则变换将设置为 ax.transData

使用 matplotlib.axes.Axes.add_artist 的示例#

带有图例的散点图

Scatter plot with a legend

BboxImage 演示

BboxImage Demo

饼图条

Bar of pie

标注图表

Annotate plots

AnnotationBbox 演示

AnnotationBbox demo

将文本用作路径

Using a text as a Path

Matplotlib 艺术家的参考

Reference for Matplotlib artists

椭圆演示

Ellipse Demo

锚定方向箭头

Anchored Direction Arrow

坐标轴网格2

Axes Grid2

插入定位器演示 2

Inset locator demo 2

简单的锚定艺术家

Simple Anchored Artists

图的结构

Anatomy of a figure

锚定艺术家

Anchored Artists

艺术家测试

Artist tests

简单图例02

Simple Legend02

图例指南

Legend guide

注解

Annotations