pythtb.Wannier.plot_density#
- Wannier.plot_density(wan_idx, mark_home_cell=False, mark_center=False, show_lattice=False, dens_size=40, lat_size=2, show=False, fig=None, ax=None, cbar=True)[source]#
Plot the Wannier function density on the lattice in 2D.
- Parameters:
- wan_idxint
Index of the Wannier function to plot.
- mark_home_cellbool
If True, mark the home cell in the plot.
- mark_centerbool
If True, mark the center of the Wannier function in the plot.
- show_latticebool
If True, show the lattice sites in the plot.
- dens_sizefloat
Size of the density markers in the plot.
- lat_sizefloat
Size of the lattice site markers in the plot.
- showbool
If True, display the plot immediately.
- figmatplotlib.figure.Figure | None
Matplotlib figure object to plot on. If None, a new figure is created.
- axmatplotlib.axes.Axes | None
Matplotlib axes object to plot on. If None, new axes are created.
- cbarbool
If True, include a colorbar in the plot.
- Returns:
- figmatplotlib.figure.Figure
The figure object containing the plot.
- axmatplotlib.axes.Axes
The axes object containing the plot.