plot#
- KikuchiPatternSimulator.plot(projection: str | None = 'stereographic', mode: str | None = 'lines', hemisphere: str | None = 'upper', scaling: str | None = 'linear', figure: mfigure.Figure | Plotter | None = None, return_figure: bool = False, backend: str = 'matplotlib', show_plotter: bool = True, color: str = 'k', **kwargs) mfigure.Figure | Plotter | None[source]#
Plot reflectors as lines or bands in the stereographic or spherical projection.
- Parameters:
- projection
Either
"stereographic"(default) or"spherical".- mode
Either
"lines"(default) or"bands". The latter option requires thatreflectorshave Bragg angles (theta) calculated.- hemisphere
Which hemisphere to plot when
projection="stereographic". Options are"upper"(default),"lower"or"both". Ignored iffigureis given.- scaling
Intensity scaling of the band kinematical intensities, either
"linear"(default), \(|F|\),"square", \(|F|^2\), orNone, giving all bands the same intensity. The intensity range is [0, highest intensity].- figure
An existing
FigureorPlotterto add the reflectors to. If not given, a new figure is created.- return_figure
Whether to return the figure. Default is
False. This is aFigureifbackend=="matplotlib"or aPlotterifbackend=="pyvista".- backend
Which plotting library to use when
projection="spherical", either"matplotlib"(default) or"pyvista". The latter option requires that PyVista is installed.- show_plotter
Whether to show the
Plotterwhenprojection="spherical"andbackend="pyvista". Default isTrue.- color
Color to give reflectors. Either a string signifying a valid Matplotlib color or
"phase", which then uses thecolor_rgbof thephase. Default is black ("k"). Only used with Matplotlib.- **kwargs
Keyword arguments passed to
draw_circle().
- Returns: