atcollab / at

Accelerator Toolbox
Apache License 2.0
48 stars 31 forks source link

Display the name of selected elements in plots #641

Closed lfarv closed 11 months ago

lfarv commented 11 months ago

Answers #619.

A new labels keyword in plot functions (Lattice.plot_beta()) allows displaying the names of the selected elements. labels may be any of the allowed refpts types (int or bool arrays, class, string…).

Example, for the hmba test lattice:

ring.plot_beta(labels=at.Quadrupole)

Figure_1