10分钟
Polygon类
matplotlib.patches.Polygon
类是多边形类。其基类是matplotlib.patches.Patch
。其构造函数为: Polygon(xy, closed=True, **kwargs)
。参数为:
xy
是一个N×2
的numpy array
,为多边形的顶点。closed
为True
则指定多边形将起点和终点重合从而显式关闭多边形。- 其他关键字参数用于设置属性
Polygon
的属性有:
- 继承自
Artist
基类的属性:.alpha
、.animated
、.axes
、.clip_box
、..clip_on
、.clip_path
、.contains
、.figure
、.gid
、.label
、.picker
、.transform
、.url
、.visible
、.zorder
- 继承自
Patch
基类的属性:.antialiased
或者.aa
、.capstyle
、.color
、.edgecolor
或者.ec
、.facecolor
或者.fc
、.fill
、.hatch
、.joinstyle
、.linestyle
或者.ls
、.linewidth
或者.lw
属性
学员评价