plot#
- GeometricalKikuchiPatternSimulation.plot(index: int | tuple | None = None, coordinates: str = 'detector', 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 [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, andindex
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()
ifpattern
is given.- lines_kwargs
Keyword arguments passed to
matplotlib.collections.LineCollection
to format Kikuchi lines iflines=True
.- zone_axes_kwargs
Keyword arguments passed to
matplotlib.collections.PathCollection
to format zone axes ifzone_axes=True
.- zone_axes_labels_kwargs
Keyword arguments passed to
matplotlib.text.Text
to format zone axes labels ifzone_axes_labels=True
.- pc_kwargs
Keyword arguments passed to
matplotlib.axes.Axes.scatter()
to format the PC ifpc=True
.- return_figure
Whether to return the figure. Default is
False
.
- Returns:
fig
Returned if
return_figure=True
.
See also