matplotlib.markers.MarkerStyle

class matplotlib.markers.MarkerStyle(marker=None, fillstyle=None) [source]

Bases: object

A class representing marker types.

Attributes:
markerslist

All known markers.

filled_markerslist

All known filled markers. This is a subset of markers.

fillstyleslist

The supported fillstyles.

Parameters:
markerstr or array-like or None, default: None

None means no marker. For other possible marker values see the module docstring matplotlib.markers.

fillstylestr, default: 'full'

One of 'full', 'left', 'right', 'bottom', 'top', 'none'.

__bool__(self) [source]
__dict__ = mappingproxy({'__module__': 'matplotlib.markers', '__doc__': '\n A class representing marker types.\n\n Attributes\n ----------\n markers : list\n All known markers.\n filled_markers : list\n All known filled markers. This is a subset of *markers*.\n fillstyles : list\n The supported fillstyles.\n ', 'markers': {'.': 'point', ',': 'pixel', 'o': 'circle', 'v': 'triangle_down', '^': 'triangle_up', '<': 'triangle_left', '>': 'triangle_right', '1': 'tri_down', '2': 'tri_up', '3': 'tri_left', '4': 'tri_right', '8': 'octagon', 's': 'square', 'p': 'pentagon', '*': 'star', 'h': 'hexagon1', 'H': 'hexagon2', '+': 'plus', 'x': 'x', 'D': 'diamond', 'd': 'thin_diamond', '|': 'vline', '_': 'hline', 'P': 'plus_filled', 'X': 'x_filled', 0: 'tickleft', 1: 'tickright', 2: 'tickup', 3: 'tickdown', 4: 'caretleft', 5: 'caretright', 6: 'caretup', 7: 'caretdown', 8: 'caretleftbase', 9: 'caretrightbase', 10: 'caretupbase', 11: 'caretdownbase', 'None': 'nothing', None: 'nothing', ' ': 'nothing', '': 'nothing'}, 'filled_markers': ('o', 'v', '^', '<', '>', '8', 's', 'p', '*', 'h', 'H', 'D', 'd', 'P', 'X'), 'fillstyles': ('full', 'left', 'right', 'bottom', 'top', 'none'), '_half_fillstyles': ('left', 'right', 'bottom', 'top'), '_point_size_reduction': 0.5, '__init__': <function MarkerStyle.__init__>, '_recache': <function MarkerStyle._recache>, '__bool__': <function MarkerStyle.__bool__>, 'is_filled': <function MarkerStyle.is_filled>, 'get_fillstyle': <function MarkerStyle.get_fillstyle>, 'set_fillstyle': <function MarkerStyle.set_fillstyle>, 'get_joinstyle': <function MarkerStyle.get_joinstyle>, 'get_capstyle': <function MarkerStyle.get_capstyle>, 'get_marker': <function MarkerStyle.get_marker>, 'set_marker': <function MarkerStyle.set_marker>, 'get_path': <function MarkerStyle.get_path>, 'get_transform': <function MarkerStyle.get_transform>, 'get_alt_path': <function MarkerStyle.get_alt_path>, 'get_alt_transform': <function MarkerStyle.get_alt_transform>, 'get_snap_threshold': <function MarkerStyle.get_snap_threshold>, '_set_nothing': <function MarkerStyle._set_nothing>, '_set_custom_marker': <function MarkerStyle._set_custom_marker>, '_set_path_marker': <function MarkerStyle._set_path_marker>, '_set_vertices': <function MarkerStyle._set_vertices>, '_set_tuple_marker': <function MarkerStyle._set_tuple_marker>, '_set_mathtext_path': <function MarkerStyle._set_mathtext_path>, '_half_fill': <function MarkerStyle._half_fill>, '_set_circle': <function MarkerStyle._set_circle>, '_set_pixel': <function MarkerStyle._set_pixel>, '_set_point': <function MarkerStyle._set_point>, '_triangle_path': Path(array([[ 0., 1.], [-1., -1.], [ 1., -1.], [ 0., 1.]]), array([ 1, 2, 2, 79], dtype=uint8)), '_triangle_path_u': Path(array([[ 0. , 1. ], [-0.6, -0.2], [ 0.6, -0.2], [ 0. , 1. ]]), array([ 1, 2, 2, 79], dtype=uint8)), '_triangle_path_d': Path(array([[-0.6, -0.2], [ 0.6, -0.2], [ 1. , -1. ], [-1. , -1. ], [-0.6, -0.2]]), array([ 1, 2, 2, 2, 79], dtype=uint8)), '_triangle_path_l': Path(array([[ 0., 1.], [ 0., -1.], [-1., -1.], [ 0., 1.]]), array([ 1, 2, 2, 79], dtype=uint8)), '_triangle_path_r': Path(array([[ 0., 1.], [ 0., -1.], [ 1., -1.], [ 0., 1.]]), array([ 1, 2, 2, 79], dtype=uint8)), '_set_triangle': <function MarkerStyle._set_triangle>, '_set_triangle_up': <function MarkerStyle._set_triangle_up>, '_set_triangle_down': <function MarkerStyle._set_triangle_down>, '_set_triangle_left': <function MarkerStyle._set_triangle_left>, '_set_triangle_right': <function MarkerStyle._set_triangle_right>, '_set_square': <function MarkerStyle._set_square>, '_set_diamond': <function MarkerStyle._set_diamond>, '_set_thin_diamond': <function MarkerStyle._set_thin_diamond>, '_set_pentagon': <function MarkerStyle._set_pentagon>, '_set_star': <function MarkerStyle._set_star>, '_set_hexagon1': <function MarkerStyle._set_hexagon1>, '_set_hexagon2': <function MarkerStyle._set_hexagon2>, '_set_octagon': <function MarkerStyle._set_octagon>, '_line_marker_path': Path(array([[ 0., -1.], [ 0., 1.]]), None), '_set_vline': <function MarkerStyle._set_vline>, '_set_hline': <function MarkerStyle._set_hline>, '_tickhoriz_path': Path(array([[0., 0.], [1., 0.]]), None), '_set_tickleft': <function MarkerStyle._set_tickleft>, '_set_tickright': <function MarkerStyle._set_tickright>, '_tickvert_path': Path(array([[-0., 0.], [-0., 1.]]), None), '_set_tickup': <function MarkerStyle._set_tickup>, '_set_tickdown': <function MarkerStyle._set_tickdown>, '_tri_path': Path(array([[ 0. , 0. ], [ 0. , -1. ], [ 0. , 0. ], [ 0.8, 0.5], [ 0. , 0. ], [-0.8, 0.5]]), array([1, 2, 1, 2, 1, 2], dtype=uint8)), '_set_tri_down': <function MarkerStyle._set_tri_down>, '_set_tri_up': <function MarkerStyle._set_tri_up>, '_set_tri_left': <function MarkerStyle._set_tri_left>, '_set_tri_right': <function MarkerStyle._set_tri_right>, '_caret_path': Path(array([[-1. , 1.5], [ 0. , 0. ], [ 1. , 1.5]]), None), '_set_caretdown': <function MarkerStyle._set_caretdown>, '_set_caretup': <function MarkerStyle._set_caretup>, '_set_caretleft': <function MarkerStyle._set_caretleft>, '_set_caretright': <function MarkerStyle._set_caretright>, '_caret_path_base': Path(array([[-1. , 0. ], [ 0. , -1.5], [ 1. , 0. ]]), None), '_set_caretdownbase': <function MarkerStyle._set_caretdownbase>, '_set_caretupbase': <function MarkerStyle._set_caretupbase>, '_set_caretleftbase': <function MarkerStyle._set_caretleftbase>, '_set_caretrightbase': <function MarkerStyle._set_caretrightbase>, '_plus_path': Path(array([[-1., 0.], [ 1., 0.], [ 0., -1.], [ 0., 1.]]), array([1, 2, 1, 2], dtype=uint8)), '_set_plus': <function MarkerStyle._set_plus>, '_x_path': Path(array([[-1., -1.], [ 1., 1.], [-1., 1.], [ 1., -1.]]), array([1, 2, 1, 2], dtype=uint8)), '_set_x': <function MarkerStyle._set_x>, '_plus_filled_path': Path(array([[0.33333333, 0. ], [0.66666667, 0. ], [0.66666667, 0.33333333], [1. , 0.33333333], [1. , 0.66666667], [0.66666667, 0.66666667], [0.66666667, 1. ], [0.33333333, 1. ], [0.33333333, 0.66666667], [0. , 0.66666667], [0. , 0.33333333], [0.33333333, 0.33333333], [0.33333333, 0. ]]), array([ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 79], dtype=uint8)), '_plus_filled_path_t': Path(array([[1. , 0.5 ], [1. , 0.66666667], [0.66666667, 0.66666667], [0.66666667, 1. ], [0.33333333, 1. ], [0.33333333, 0.66666667], [0. , 0.66666667], [0. , 0.5 ], [1. , 0.5 ]]), array([ 1, 2, 2, 2, 2, 2, 2, 2, 79], dtype=uint8)), '_set_plus_filled': <function MarkerStyle._set_plus_filled>, '_x_filled_path': Path(array([[0.25, 0. ], [0.5 , 0.25], [0.75, 0. ], [1. , 0.25], [0.75, 0.5 ], [1. , 0.75], [0.75, 1. ], [0.5 , 0.75], [0.25, 1. ], [0. , 0.75], [0.25, 0.5 ], [0. , 0.25], [0.25, 0. ]]), array([ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 79], dtype=uint8)), '_x_filled_path_t': Path(array([[0.75, 0.5 ], [1. , 0.75], [0.75, 1. ], [0.5 , 0.75], [0.25, 1. ], [0. , 0.75], [0.25, 0.5 ], [0.75, 0.5 ]]), array([ 1, 2, 2, 2, 2, 2, 2, 79], dtype=uint8)), '_set_x_filled': <function MarkerStyle._set_x_filled>, '__dict__': <attribute '__dict__' of 'MarkerStyle' objects>, '__weakref__': <attribute '__weakref__' of 'MarkerStyle' objects>})
__init__(self, marker=None, fillstyle=None) [source]
Parameters:
markerstr or array-like or None, default: None

None means no marker. For other possible marker values see the module docstring matplotlib.markers.

fillstylestr, default: 'full'

One of 'full', 'left', 'right', 'bottom', 'top', 'none'.

__module__ = 'matplotlib.markers'
__weakref__

list of weak references to the object (if defined)

filled_markers = ('o', 'v', '^', '<', '>', '8', 's', 'p', '*', 'h', 'H', 'D', 'd', 'P', 'X')
fillstyles = ('full', 'left', 'right', 'bottom', 'top', 'none')
get_alt_path(self) [source]

Return a Path for the alternate part of the marker.

For unfilled markers, this is None; for filled markers, this is the area to be drawn with markerfacecoloralt.

get_alt_transform(self) [source]

Return the transform to be applied to the Path from MarkerStyle.get_alt_path().

get_capstyle(self) [source]
get_fillstyle(self) [source]
get_joinstyle(self) [source]
get_marker(self) [source]
get_path(self) [source]

Return a Path for the primary part of the marker.

For unfilled markers this is the whole marker, for filled markers, this is the area to be drawn with markerfacecolor.

get_snap_threshold(self) [source]
get_transform(self) [source]

Return the transform to be applied to the Path from MarkerStyle.get_path().

is_filled(self) [source]
markers = {'.': 'point', ',': 'pixel', 'o': 'circle', 'v': 'triangle_down', '^': 'triangle_up', '<': 'triangle_left', '>': 'triangle_right', '1': 'tri_down', '2': 'tri_up', '3': 'tri_left', '4': 'tri_right', '8': 'octagon', 's': 'square', 'p': 'pentagon', '*': 'star', 'h': 'hexagon1', 'H': 'hexagon2', '+': 'plus', 'x': 'x', 'D': 'diamond', 'd': 'thin_diamond', '|': 'vline', '_': 'hline', 'P': 'plus_filled', 'X': 'x_filled', 0: 'tickleft', 1: 'tickright', 2: 'tickup', 3: 'tickdown', 4: 'caretleft', 5: 'caretright', 6: 'caretup', 7: 'caretdown', 8: 'caretleftbase', 9: 'caretrightbase', 10: 'caretupbase', 11: 'caretdownbase', 'None': 'nothing', None: 'nothing', ' ': 'nothing', '': 'nothing'}
set_fillstyle(self, fillstyle) [source]

Set the fillstyle.

Parameters:
fillstyle{'full', 'left', 'right', 'bottom', 'top', 'none'}

The part of the marker surface that is colored with markerfacecolor.

set_marker(self, marker) [source]

Set the marker.

Parameters:
markerstr or array-like or None, default: None

None means no marker. For other possible marker values see the module docstring matplotlib.markers.

Examples using matplotlib.markers.MarkerStyle

© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.3.3/api/_as_gen/matplotlib.markers.MarkerStyle.html