differt.plotting.draw_markers#
- draw_markers(markers, labels=None, text_kwargs=None, **kwargs)[source]#
Plot markers and, optionally, their label.
- Parameters:
markers (
Real[ArrayLike, '*batch 3']) – The array of marker vertices.text_kwargs (
Mapping[str,Any] |None) –A mapping of keyword arguments passed to
Textif VisPy backend is used.By default,
font_size=1000is used.kwargs (
Any) – Keyword arguments passed toMarkers,scatter, orScatter3d, depending on the backend.
- Return type:
- Returns:
The resulting plot output.
Warning
Matplotlib does not support labels.
Examples
The following example shows how to plot several annotated markers.
>>> from differt.plotting import draw_markers >>> >>> markers = np.array([ ... [0.0, 0.0, 0.0], ... [1.0, 0.0, 0.0], ... [1.0, 1.0, 0.0], ... [0.0, 1.0, 0.0], ... ]) >>> labels = ["A", "B", "C", "D"] >>> fig = draw_markers(markers, labels, backend="plotly") >>> fig