plot_unit_cell#

Orientation.plot_unit_cell(c: str = 'tab:blue', return_figure: bool = False, axes_length: float = 0.5, structure: Structure | None = None, crystal_axes_loc: str = 'origin', **arrow_kwargs) Figure[source]#

Plot the unit cell orientation, showing the sample and crystal reference frames.

Parameters:
c

Unit cell edge color.

return_figure

Return the plotted figure.

axes_length

Length of the reference axes in Angstroms, by default 0.5.

structure

Structure of the unit cell, only orthorhombic lattices are currently supported. If not given, a cubic unit cell with a lattice parameter of 2 Angstroms will be plotted.

crystal_axes_loc

Plot the crystal reference frame axes at the "origin" (default) or "center" of the plotted cell.

**arrow_kwargs

Keyword arguments passed to matplotlib.patches.FancyArrowPatch, for example "arrowstyle".

Returns:
fig

The plotted figure, returned if return_figure=True.

Raises:
ValueError

If size > 1.