erlab.plotting.bz¶
Utilities for plotting Brillouin zones.
Functions
|
Plot a Brillouin zone, given the basis vectors. |
|
Plot a 2D hexagonal BZ overlay on the specified axes. |
- erlab.plotting.bz.plot_bz(basis, *, reciprocal=False, rotate=0.0, offset=(0.0, 0.0), ax=None, **kwargs)[source]¶
Plot a Brillouin zone, given the basis vectors.
- Parameters:
basis (
ndarray[tuple[Any,...],dtype[floating]]) – A 2D or 3D numpy array with shape(N, N)whereN = 2or3, containing the basis vectors of the lattice. If N is 3, only the upper left 2x2 submatrix is used.reciprocal (
bool, default:False) – IfTrue, the basis vectors are interpreted as reciprocal lattice vectors.rotate (
float, default:0.0) – Rotation angle in degrees to apply to the BZ.offset (
tuple[float,float], default:(0.0, 0.0)) – Offset for the Brillouin zone center in the form of a tuple(x, y).ax (
Axes|None, default:None) – The axes to plot the BZ on. IfNone, the current axes are used.**kwargs – Additional keyword arguments passed to
matplotlib.patches.Polygon.
- erlab.plotting.bz.plot_hex_bz(a=3.54, *, reciprocal=False, rotate=0.0, offset=(0.0, 0.0), ax=None, **kwargs)[source]¶
Plot a 2D hexagonal BZ overlay on the specified axes.
- Parameters:
a (
float, default:3.54) – Lattice constant of the hexagonal lattice.reciprocal (
bool, default:False) – IfTrue,ais interpreted as the periodicity of the reciprocal lattice.rotate (
float, default:0.0) – Rotation angle in degrees to apply to the BZ.offset (
tuple[float,float], default:(0.0, 0.0)) – Offset for the Brillouin zone center in the form of a tuple(x, y).ax (
Axes|None, default:None) – The axes to plot the BZ on. IfNone, the current axes are used.**kwargs – Additional keyword arguments passed to
matplotlib.patches.RegularPolygon.