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[源代码][源代码]# 用于渲染到 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.get_mouseover 当鼠标光标移动到该艺术家上时,返回是否查询该艺术家的自定义上下文信息。 Artist.mouseover 当鼠标光标移动到该艺术家上时,返回是否查询该艺术家的自定义上下文信息。 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.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 返回用于聚合过滤的过滤函数。 Artist.get_window_extent 获取艺术家在显示空间中的边界框。 Artist.get_tightbbox 类似于 Artist.get_window_extent,但包括任何裁剪。 Artist.get_transformed_clip_path_and_affine 返回应用了其变换的非仿射部分的剪辑路径,以及其变换的剩余仿射部分。 图和轴# Artist.remove 如果可能,从图形中移除艺术家。 Artist.axes 艺术家所在的 Axes 实例,或为 None。 Artist.set_figure 设置艺术家所属的 Figure 或 SubFigure 实例。 Artist.get_figure 返回艺术家所属的 Figure 或 SubFigure 实例。 子节点# Artist.get_children 返回此 Artist 的子 Artist 列表。 Artist.findobj 查找艺术家对象。 转换# 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 艺术家是否'过时',需要重新绘制以使输出与艺术家的内部状态匹配。 函数# allow_rasterization Artist.draw 方法的装饰器。 get 返回 Artist 的 属性 值,或打印所有属性。 getp 返回 Artist 的 属性 值,或打印所有属性。 setp 在一个 Artist 上设置一个或多个属性,或列出允许的值。 kwdoc 检查一个 Artist 类(使用 ArtistInspector)并返回其可设置属性的信息及其当前值。 ArtistInspector 一个辅助类,用于检查 Artist 并返回其可设置属性的信息及其当前值。