plot#

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

Plot a single simulation on the detector.

Parameters:
index

Index of the simulation to plot. If not given, this is the first simulation. If navigation_shape is 2D, and index is passed, it must be a 2-tuple.

coordinates

The coordinates of the plot axes, either "detector" (default) or "gnomonic".

pattern

A pattern to plot the simulation onto. If not given, the simulation is plotted on a gray background.

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 pattern is given.

lines_kwargs

Keyword arguments passed to matplotlib.collections.LineCollection to format Kikuchi lines if lines=True.

zone_axes_kwargs

Keyword arguments passed to matplotlib.collections.PathCollection to format zone axes if zone_axes=True.

zone_axes_labels_kwargs

Keyword arguments passed to matplotlib.text.Text to format zone axes labels if zone_axes_labels=True.

pc_kwargs

Keyword arguments passed to matplotlib.axes.Axes.scatter() to format the PC if pc=True.

return_figure

Whether to return the figure. Default is False.

Returns:
fig

Returned if return_figure=True.