matplotlib.markers.MarkerStyle#
- class matplotlib.markers.MarkerStyle(marker, fillstyle=None, transform=None, capstyle=None, joinstyle=None)[source]#
基类:
object
一个表示标记类型的类。
实例是不可变的。如果需要更改任何内容,请创建一个新实例。
- 属性:
- markersdict
所有已知标记。
- filled_markerstuple
所有已知的填充标记。这是 markers 的一个子集。
- fillstylestuple
支持的填充样式。
- 参数:
- markerstr, array-like, Path, MarkerStyle
另一个
MarkerStyle
实例会复制该 marker 的详细信息。有关其他可能的标记值,请参阅模块文档字符串
matplotlib.markers
。
- fillstylestr, 默认值:
rcParams["markers.fillstyle"]
(默认值:'full'
) 以下之一:'full'、'left'、'right'、'bottom'、'top'、'none'。
- transform
Transform
, 可选 将与标记的原始变换结合使用的变换。
- capstyle
CapStyle
或 %(CapStyle)s, 可选 将覆盖标记默认端点样式的端点样式。
- joinstyle
JoinStyle
或 %(JoinStyle)s, 可选 将覆盖标记默认连接样式的连接样式。
- filled_markers = ('.', 'o', 'v', '^', '<', '>', '8', 's', 'p', '*', 'h', 'H', 'D', 'd', 'P', 'X')#
- fillstyles = ('full', 'left', 'right', 'bottom', 'top', 'none')#
- get_alt_transform()[source]#
返回应用于
Path
的变换,该Path
来自MarkerStyle.get_alt_path()
。
- get_transform()[source]#
返回应用于
Path
的变换,该Path
来自MarkerStyle.get_path()
。
- markers = {' ': 'nothing', '': 'nothing', '*': 'star', '+': 'plus', ',': 'pixel', '.': 'point', '1': 'tri_down', '2': 'tri_up', '3': 'tri_left', '4': 'tri_right', '8': 'octagon', '<': 'triangle_left', '>': 'triangle_right', 'D': 'diamond', 'H': 'hexagon2', 'None': 'nothing', 'P': 'plus_filled', 'X': 'x_filled', '^': 'triangle_up', '_': 'hline', 'd': 'thin_diamond', 'h': 'hexagon1', 'none': 'nothing', 'o': 'circle', 'p': 'pentagon', 's': 'square', 'v': 'triangle_down', 'x': 'x', '|': 'vline', 0: 'tickleft', 1: 'tickright', 10: 'caretupbase', 11: 'caretdownbase', 2: 'tickup', 3: 'tickdown', 4: 'caretleft', 5: 'caretright', 6: 'caretup', 7: 'caretdown', 8: 'caretleftbase', 9: 'caretrightbase'}#
- rotated(*, deg=None, rad=None)[source]#
返回此标记按指定角度旋转后的新版本。
- 参数:
- degfloat, 可选
旋转角度(度)。
- radfloat, 可选
旋转角度(弧度)。
- .. note:: 您必须精确指定 `deg` 或 `rad` 中的一个。