wulfric.visualization.MatplotlibBackend#
- class wulfric.visualization.MatplotlibBackend(fig=None, ax=None, background=True, focal_length=0.2)[source]#
Plotting engine based on matplotlib.
- Parameters:
- figmatplotlib figure, optional
Figure to plot on. If not provided, a new figure and
axis created.- axmatplotlib axis, optional
Axis to plot on. If not provided, a new axis is created.
- backgroundbool, default True
Whether to keep the axis in the plot.
- focal_lengthfloat, default 0.2
- Attributes:
- figmatplotlib figure
Figure to plot on.
- axmatplotlib axis
Axis to plot on.
- artistsdict
Dictionary of the artists. Keys are the plot kinds, values are the lists of artists.
Notes
This class is a part of
wulfric[visual]Methods:
clear()Clears the axis.
legend(**kwargs)Adds legend to the figure.
plot(cell[, kind])Main plotting method.
plot_brillouin(*args[, color])Plot brillouin zone.
plot_brillouin_kpath(*args[, zone_color, ...])Plot brillouin zone and kpath.
plot_conventional(*args, **kwargs)Plot conventional unit cell.
plot_kpath(cell[, color, label, normalize])Plots k path in the reciprocal space.
plot_primitive(*args, **kwargs)Plot primitive unit cell.
plot_unit_cell(cell[, vectors, color, ...])Plots real or reciprocal unit cell.
plot_wigner_seitz(cell[, vectors, color, ...])Plots Wigner-Seitz cell.
remove([kind])Removes a set of artists from the plot.
save([output_name, elev, azim])Saves the figure in the file.
show([elev, azim])Shows the figure in the interactive mode.