marsilea.plotter.MarkerMesh#

class MarkerMesh(data, color='black', marker='*', size=35, frameon=False, label=None, label_loc=None, label_props=None, **kwargs)#

Bases: MeshBase

The mesh that draw marker shape

Parameters:
datanp.ndarray

Must be bool matrix to indicate if a marker is drawn at specific cell

colorcolor

The color of the marker.

markerstr

See matplotlib.markers

sizeint

The of marker in fontsize unit

frameonbool

Whether to draw the border of the plot

labelstr

The label of the plot, only show when added to the side plot

label_loc{‘top’, ‘bottom’, ‘left’, ‘right’}

The position of the label

label_propsdict

See matplotlib.text.Text

kwargs

Examples

>>> from marsilea.plotter import MarkerMesh
>>> data = np.random.randn(10, 10) > 0
>>> _, ax = plt.subplots(figsize=(3, 3))
>>> MarkerMesh(data, color="darkgreen", marker="x", size=50).render(ax)
../../_images/marsilea-plotter-MarkerMesh-1.png
render_main = True#