hyperspy.misc.label_position module

class hyperspy.misc.label_position.SpectrumLabelPosition(signal)

Bases: object

A class to get the positions of labels in spectrums such as EELS, EDX, XRF. The main method is the get_markers method which the user supplies a dictionary of edge labels specifying its energy positions, and it returns markers for labelling them.


text (matplotlib.text.Text instance) –


Get the markers (vertical line segment and text box) for labelling the edges


labels (dictionary) – A dictionary with the labels as keys and their energies as values. E.g. for EELS edges it could be {‘Mn_L2’: 651.0, ‘Cr_L3’: 575.0}.


  • vls (list) – A list contains HyperSpy’s vertical line segment marker

  • txs (list) – A list contains HyperSpy’s text marker