plot#

GeometricalKikuchiPatternSimulation.plot(index: int | tuple | None = None, coordinates: Literal['pixel', 'gnomonic', 'detector'] = 'pixel', pattern: ndarray | None = None, lines: bool = True, zone_axes: bool = True, zone_axes_labels: bool = True, pc: bool = True, pattern_kwargs: dict | None = None, lines_kwargs: dict | None = None, zone_axes_kwargs: dict | None = None, zone_axes_labels_kwargs: dict | None = None, pc_kwargs: dict | None = None, return_figure: bool = False) Figure | None[source]#

Plot a single simulation on the detector.

Parameters:
index

Index of the simulation to plot. This is the first simulation if not given. Must be a 2-tuple if navigation_shape is 2D.

coordinates

Coordinate space of the plot axes, either “pixel” (default) or “gnomonic”.

Passing “detector” is deprecated and will raise an error in version 0.13.0.

pattern

Pattern to plot the simulation onto. The simulation is plotted on a gray background if not given.

lines

Whether to show Kikuchi lines. Default is True.

zone_axes

Whether to show zone axes. Default is True.

zone_axes_labels

Whether to show zone axes labels. Default is True.

pc

Whether to show the projection/pattern centre (PC). Default is True.

pattern_kwargs

Keyword arguments passed to matplotlib.axes.Axes.imshow() if a pattern is given.

lines_kwargs

Keyword arguments passed to matplotlib.collections.LineCollection if lines is True.

zone_axes_kwargs

Keyword arguments passed to matplotlib.collections.PathCollection if zone_axes is True.

zone_axes_labels_kwargs

Keyword arguments passed to matplotlib.text.Text if zone_axes_labels is True.

pc_kwargs

Keyword arguments passed to matplotlib.axes.Axes.scatter() if pc is True.

return_figure

Whether to return the figure. Default is False.

Returns:
fig

Returned if return_figure is True.