matplotlib.artist# 继承图# Inheritance diagram of matplotlib.axes._axes.Axes, matplotlib.axes._base._AxesBase, matplotlib.axis.Axis, matplotlib.axis.Tick, matplotlib.axis.XAxis, matplotlib.axis.XTick, matplotlib.axis.YAxis, matplotlib.axis.YTick, matplotlib.collections.AsteriskPolygonCollection, matplotlib.collections.CircleCollection, matplotlib.collections.Collection, matplotlib.collections.EllipseCollection, matplotlib.collections.EventCollection, matplotlib.collections.LineCollection, matplotlib.collections.PatchCollection, matplotlib.collections.PathCollection, matplotlib.collections.PolyCollection, matplotlib.collections.QuadMesh, matplotlib.collections.RegularPolyCollection, matplotlib.collections.StarPolygonCollection, matplotlib.collections.TriMesh, matplotlib.collections._CollectionWithSizes, matplotlib.contour.ContourSet, matplotlib.contour.QuadContourSet, matplotlib.figure.FigureBase, matplotlib.figure.Figure, matplotlib.figure.SubFigure, matplotlib.image.AxesImage, matplotlib.image.BboxImage, matplotlib.image.FigureImage, matplotlib.image.NonUniformImage, matplotlib.image.PcolorImage, matplotlib.image._ImageBase, matplotlib.legend.Legend, matplotlib.lines.Line2D, matplotlib.offsetbox.AnchoredOffsetbox, matplotlib.offsetbox.AnchoredText, matplotlib.offsetbox.AnnotationBbox, matplotlib.offsetbox.AuxTransformBox, matplotlib.offsetbox.DrawingArea, matplotlib.offsetbox.HPacker, matplotlib.offsetbox.OffsetBox, matplotlib.offsetbox.OffsetImage, matplotlib.offsetbox.PackerBase, matplotlib.offsetbox.PaddedBox, matplotlib.offsetbox.TextArea, matplotlib.offsetbox.VPacker, matplotlib.patches.Annulus, matplotlib.patches.Arc, matplotlib.patches.Arrow, matplotlib.patches.Circle, matplotlib.patches.CirclePolygon, matplotlib.patches.ConnectionPatch, matplotlib.patches.Ellipse, matplotlib.patches.FancyArrow, matplotlib.patches.FancyArrowPatch, matplotlib.patches.FancyBboxPatch, matplotlib.patches.Patch, matplotlib.patches.PathPatch, matplotlib.patches.Polygon, matplotlib.patches.Rectangle, matplotlib.patches.RegularPolygon, matplotlib.patches.Shadow, matplotlib.patches.StepPatch, matplotlib.patches.Wedge, matplotlib.projections.geo.AitoffAxes, matplotlib.projections.geo.GeoAxes, matplotlib.projections.geo.HammerAxes, matplotlib.projections.geo.LambertAxes, matplotlib.projections.geo.MollweideAxes, matplotlib.projections.polar.PolarAxes, matplotlib.projections.polar.RadialAxis, matplotlib.projections.polar.RadialTick, matplotlib.projections.polar.ThetaAxis, matplotlib.projections.polar.ThetaTick, matplotlib.quiver.Barbs, matplotlib.quiver.Quiver, matplotlib.quiver.QuiverKey, matplotlib.spines.Spine, matplotlib.table.Cell, matplotlib.table.Table, matplotlib.text.Annotation, matplotlib.text.Text, matplotlib.tri.TriContourSet Artist 类# class matplotlib.artist.Artist[source]# 在FigureCanvas中渲染对象的抽象基类。 通常,图中所有可见元素都是Artist的子类。 交互式# Artist.add_callback 添加一个回调函数,当Artist的某个属性发生变化时,该函数将被调用。 Artist.remove_callback 根据其观察者 ID 移除回调函数。 Artist.pchanged 调用所有已注册的回调函数。 Artist.get_cursor_data 返回给定事件的光标数据。 Artist.format_cursor_data 返回 data 的字符串表示形式。 Artist.set_mouseover 设置当鼠标光标悬停在此 artist 上时,是否查询其自定义上下文信息。 Artist.get_mouseover 返回当鼠标光标移动到此 artist 上时,是否会查询其自定义上下文信息。 Artist.mouseover 返回当鼠标光标移动到此 artist 上时,是否会查询其自定义上下文信息。 Artist.contains 测试艺术家是否包含鼠标事件。 Artist.pick 处理拾取事件。 Artist.pickable 返回此艺术家对象是否可拾取。 Artist.set_picker 定义艺术家的拾取行为。 Artist.get_picker 返回艺术家的拾取行为。 裁剪# Artist.set_clip_on 设置艺术家是否使用裁剪。 Artist.get_clip_on 返回艺术家是否使用裁剪。 Artist.set_clip_box 设置艺术家的裁剪Bbox。 Artist.get_clip_box 返回裁剪框。 Artist.set_clip_path 设置艺术家的裁剪路径。 Artist.get_clip_path 返回裁剪路径。 批量属性# Artist.update 从字典props更新此艺术家的属性。 Artist.update_from 从other复制属性到self。 Artist.properties 返回艺术家所有属性的字典。 Artist.set 一次性设置多个属性。 绘图# Artist.draw 使用给定的渲染器绘制 Artist(及其子对象)。 Artist.set_animated 设置艺术家是否用于动画。 Artist.get_animated 返回此艺术对象是否为动画。 Artist.set_alpha 设置用于混合的alpha值 - 不支持所有后端。 Artist.get_alpha 返回用于混合的alpha值 - 不支持所有后端。 Artist.set_snap 设置吸附行为。 Artist.get_snap 返回吸附设置。 Artist.set_visible 设置艺术家的可见性。 Artist.get_visible 返回可见性。 Artist.zorder Artist.set_zorder 设置艺术家的zorder。 Artist.get_zorder 返回艺术家的zorder。 Artist.set_agg_filter 设置 agg 过滤器。 Artist.set_sketch_params 设置草图参数。 Artist.get_sketch_params 返回艺术家的草图参数。 Artist.set_rasterized 强制矢量图形输出进行栅格化(位图)绘图。 Artist.get_rasterized 返回艺术家是否将被栅格化。 Artist.set_path_effects 设置路径效果。 Artist.get_path_effects Artist.get_agg_filter 返回用于agg过滤的过滤函数。 Artist.get_window_extent 获取 artist 在显示空间中的边界框。 Artist.get_tightbbox 与Artist.get_window_extent类似,但包含任何裁剪。 Artist.get_transformed_clip_path_and_affine 返回剪裁路径(已应用其非仿射变换部分)以及其变换的剩余仿射部分。 图形和轴# Artist.remove 如果可能,从图中移除该 artist。 Artist.axes 艺术家所在的Axes实例,或None。 Artist.set_figure 设置艺术家所属的Figure或SubFigure实例。 Artist.get_figure 返回艺术家所属的Figure或SubFigure实例。 子代# Artist.get_children 返回此Artist的子Artist列表。 Artist.findobj 查找 artist 对象。 变换# Artist.set_transform 设置艺术家变换。 Artist.get_transform 返回此艺术家使用的Transform实例。 Artist.is_transform_set 返回Artist是否显式设置了变换。 单位# Artist.convert_xunits 使用 x 轴的单位类型转换 *x*。 Artist.convert_yunits 使用 y 轴的单位类型转换 y。 Artist.have_units 返回任何轴上是否设置了单位。 元数据# Artist.set_gid 设置艺术家的(组)ID。 Artist.get_gid 返回组ID。 Artist.set_label 设置将在图例中显示的标签。 Artist.get_label 返回此艺术家在图例中使用的标签。 Artist.set_url 设置艺术家的url。 Artist.get_url 返回url。 杂项# Artist.sticky_edges 用于自动缩放的x和y粘性边列表。 Artist.set_in_layout 设置艺术家是否包含在布局计算中,例如。 Artist.get_in_layout 返回布尔标志,如果艺术家包含在布局计算中,则为True。 Artist.stale artist 是否“过时”,需要重新绘制以使输出与 artist 的内部状态匹配。 函数# allow_rasterization Artist.draw方法的装饰器。 get 返回Artist的属性值,或打印所有属性。 getp 返回Artist的属性值,或打印所有属性。 setp 设置Artist的一个或多个属性,或列出允许的值。 kwdoc 检查Artist类(使用ArtistInspector)并返回其可设置属性及其当前值的信息。 ArtistInspector 一个辅助类,用于检查Artist并返回其可设置属性及其当前值的信息。