hyperspy.drawing.marker module

class hyperspy.drawing.marker.MarkerBase

Bases: object

Marker that can be added to the signal figure

marker_properties

Accepts a dictionary of valid (i.e. recognized by mpl.plot) containing valid line properties. In addition it understands the keyword type that can take the following values: {‘line’, ‘text’}

Type

dictionary

add_data(**kwargs)

Add data to the structured array. Each field of data should have the same dimensions than the navigation axes. The other fields are not changed.

close(render_figure=True)

Remove and disconnect the marker.

Parameters

render_figure (bool, optional, default True) – If True, the figure is rendered after removing the marker. If False, the figure is not rendered after removing the marker. This is useful when many markers are removed from a figure, since rendering the figure after removing each marker will slow things down.

plot(render_figure=True)

Plot a marker which has been added to a signal.

Parameters

render_figure (bool, optional, default True) – If True, will render the figure after adding the marker. If False, the marker will be added to the plot, but will the figure will not be rendered. This is useful when plotting many markers, since rendering the figure after adding each marker will slow things down.

set_data(x1=None, y1=None, x2=None, y2=None, text=None, size=None)

Set data to the structured array. Each field of data should have the same dimensions than the navigation axes. The other fields are overwritten.

set_marker_properties(**kwargs)

Set the line_properties attribute using keyword arguments.