erlab.plotting.bz

Utilities for plotting Brillouin zones.

Functions

plot_bz(basis, *[, reciprocal, rotate, ...])

Plot a Brillouin zone, given the basis vectors.

plot_hex_bz([a, reciprocal, rotate, offset, ax])

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) where N = 2 or 3, containing the basis vectors of the lattice. If N is 3, only the upper left 2x2 submatrix is used.

  • reciprocal (bool, default: False) – If True, 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. If None, 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) – If True, a is 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. If None, the current axes are used.

  • **kwargs – Additional keyword arguments passed to matplotlib.patches.RegularPolygon.