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 thatreflectors
have Bragg angles (theta
) calculated.- hemisphere
Which hemisphere to plot when
projection="stereographic"
. Options are"upper"
(default),"lower"
or"both"
. Ignored iffigure
is 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
Figure
orPlotter
to add the reflectors to. If not given, a new figure is created.- return_figure
Whether to return the figure. Default is
False
. This is aFigure
ifbackend=="matplotlib"
or aPlotter
ifbackend=="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
Plotter
whenprojection="spherical"
andbackend="pyvista"
. Default isTrue
.- color
Color to give reflectors. Either a string signifying a valid Matplotlib color or
"phase"
, which then uses thecolor_rgb
of thephase
. Default is black ("k"
). Only used with Matplotlib.- **kwargs
Keyword arguments passed to
draw_circle()
.
- Returns: