Bandstructure
- class hubbard.plot.Bandstructure(HH, bz=[([0.0, 0.0, 0.0], '$\\Gamma$'), ([0.5, 0.0, 0.0], 'X')], ymax=4.0, projection=None, scale=1, c='r', spin=0, **kwargs)[source]
Bases:
hubbard.plot.plot.Plot
Plot the bandstructure for the HubbardHamiltonian object along certain path of the Brillouin Zone
- Parameters
bz (list of tuples or sisl.BandStructure, optional) – k points to build the path along the first Brillouin Zone with their corresponding string labels
[(k1, label1),(k2, label2)]
, or directly pass thesisl.BandStructure
objectprojection (list, optional) – sites to project the bands onto
scale (float, optional) – in case
projection!=None
, scale controls the size of the error bar to plot the projection onto the bandsymax (float, optional) – maximum point in the vertical axis
spin (int, or list of int optional) – to plot the bandstructure corresponding to the spin index (0, or 1) or plot simultaneusly both spin indices by passing spin=[0,1] Defaults to 0
c (str, or list of str optional) – color for the bandstructure lines. If a list is passed it plots each spin component with the selected colors, otherwise it defaults to red and green for spin indices 0 and 1, respectively. See matplotlib color setting
Methods
__init__
(HH[, bz, ymax, projection, scale, ...])add_bands
(HH[, bz, projection, scale, c, spin])add_colorbar
(layer[, pos, size])Add figure colorbar
close
()Close figure
legend
(**kwargs)Add legend to figure.
savefig
(fn)Save figure to external file
set_title
(title[, fontsize])Set figure title
set_xlabel
(label[, fontsize])Set label for the x-axis
set_xlim
(xmin, xmax)Set maximum and minimum x-axis values
set_ylabel
(label[, fontsize])Set label for the y-axis
set_ylim
(ymin, ymax)Set maximum and minimum y-axis values
- add_bands(HH, bz=[([0.0, 0.0, 0.0], '$\\Gamma$'), ([0.5, 0.0, 0.0], 'X')], projection=None, scale=1, c='r', spin=0)[source]
- add_colorbar(layer, pos='right', size='5%')
Add figure colorbar
- Parameters
layer (matplotlib.cm.ScalarMappable) – i.e., AxesImage, ContourSet, etc. described by this colorbar
pos (str, optional) – position of the colorbar with respect to axes
size (str, optional) – size of the colorbar in %
- close()
Close figure
- legend(**kwargs)
Add legend to figure. It takes into account possible repeated labels and show them once
- savefig(fn)
Save figure to external file
- Parameters
fn (str) – external file name to save plot
See also
- set_title(title, fontsize=16)
Set figure title
- set_xlabel(label, fontsize=16)
Set label for the x-axis
- set_xlim(xmin, xmax)
Set maximum and minimum x-axis values
- set_ylabel(label, fontsize=16)
Set label for the y-axis