本文简要介绍 python 语言中 matplotlib.legend_handler.HandlerBase
的用法。
-
默认图例处理程序的基类。
派生类旨在重写
create_artists
方法,该方法具有以下签名:def create_artists(self, legend, orig_handle, xdescent, ydescent, width, height, fontsize, trans):
重写的方法需要创建适合给定尺寸(xdescent、ydescent、width、height)的给定变换的艺术家,必要时按字体大小缩放。
- 参数:
- xpad 浮点数,可选
-
x 方向的填充。
- ypad 浮点数,可选
-
y 方向的填充。
- update_func 可调用的,可选的
-
用于从另一个图例处理程序更新图例处理程序属性的函数,由
update_prop
使用。
用法
class matplotlib.legend_handler.HandlerBase(xpad=0.0, ypad=0.0, update_func=None)
相关用法
- Python matplotlib axvspan用法及代码示例
- Python matplotlib Axes.get_legend_handles_labels用法及代码示例
- Python matplotlib AbstractMovieWriter用法及代码示例
- Python matplotlib triplot用法及代码示例
- Python matplotlib StarPolygonCollection.set_hatch用法及代码示例
- Python matplotlib Axes.hist用法及代码示例
- Python matplotlib boxplot用法及代码示例
- Python matplotlib subplots用法及代码示例
- Python matplotlib InsetPosition用法及代码示例
- Python matplotlib ToolManager.toolmanager_disconnect用法及代码示例
- Python matplotlib Figure.set_size_inches用法及代码示例
- Python matplotlib figlegend用法及代码示例
- Python matplotlib Axes.step用法及代码示例
- Python matplotlib Axes.contour用法及代码示例
- Python matplotlib LassoSelector用法及代码示例
- Python matplotlib BrokenBarHCollection.set_hatch用法及代码示例
- Python matplotlib Axes.plot用法及代码示例
- Python matplotlib Axes.semilogx用法及代码示例
- Python matplotlib Axes.semilogy用法及代码示例
- Python matplotlib MovieWriterRegistry.register用法及代码示例
- Python matplotlib PolyQuadMesh.set_hatch用法及代码示例
- Python matplotlib warn_deprecated用法及代码示例
- Python matplotlib Text.set_bbox用法及代码示例
- Python matplotlib Axes.inset_axes用法及代码示例
- Python matplotlib delete_parameter用法及代码示例
注:本文由纯净天空筛选整理自skytowner.com大神的英文原创作品 matplotlib.legend_handler.HandlerBase。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。