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_shapeis 2D, andindexis 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()ifpatternis given.- lines_kwargs
Keyword arguments passed to
matplotlib.collections.LineCollectionto format Kikuchi lines iflines=True.- zone_axes_kwargs
Keyword arguments passed to
matplotlib.collections.PathCollectionto format zone axes ifzone_axes=True.- zone_axes_labels_kwargs
Keyword arguments passed to
matplotlib.text.Textto 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:
figReturned if
return_figure=True.
See also