plot_spherical#

EBSDMasterPattern.plot_spherical(energy: int | float | None = None, return_figure: bool = False, style: str = 'surface', plotter_kwargs: dict = None, show_kwargs: dict = None) pyvista.Plotter[source]#

Plot the master pattern sphere.

This requires the master pattern to be in the stereographic projection and both hemispheres to be present.

Parameters:
energy

Acceleration voltage in kV used to simulate the master pattern to plot. If not given, the highest energy is used.

return_figure

Whether to return the pyvista.Plotter instance for further modification and then plotting. Default is False. If True, the figure is not plotted.

style

Visualization style of the mesh, either "surface" (default), "wireframe" or "points". In general, "surface" is recommended when zoomed out, while "points" is recommended when zoomed in. See pyvista.Plotter.add_mesh() for details.

plotter_kwargs

Dictionary of keyword arguments passed to pyvista.Plotter.

show_kwargs

Dictionary of keyword arguments passed to pyvista.Plotter.show() if return_figure=False.

Returns:
pl

Only returned if return_figure=True.

Notes

Requires pyvista (see the installation guide).

Examples

>>> import kikuchipy as kp
>>> mp = kp.data.nickel_ebsd_master_pattern_small(projection="stereographic")
>>> mp.plot_spherical()