figures#

Shared anyplotlib primitives.

Every .show() in de_ebsd renders through de_ebsd.viz, so the package has one way to draw. Helpers return an anyplotlib.Figure: interactive in Jupyter, exportable via figure.save_html(path).

Functions

apl()

Import anyplotlib lazily so headless jobs never pay for the display stack.

bar_figure(values, labels[, title, colors])

Bar chart of one value per labeled item (structure factors, reflections).

image_figure(image[, title, cmap])

Single image panel.

label(panel, title)

Attach a title to a plot panel if the panel supports one.

to_uint8_rgb(image)

Normalize a 2D array to a grayscale (H, W, 3) uint8 texture.