Spectrum
- class hubbard.plot.Spectrum(HH, k=[0, 0, 0], xmax=10, ymin=0, ymax=0, fontsize=16, **kwargs)[source]
Bases:
hubbard.plot.plot.Plot
Plot the orbital charge overlaps for the
hubbard.HubbardHamiltonian
object- Parameters
HH (hubbard.HubbardHamiltonian) – the mean-field Hubbard Hamiltonian from which the LDOS should be computed
k (array_like, optional) – k-point in the Brillouin zone to sample
xmax (float, optional) – the energy range (-xmax, xmax) wrt. midgap to be plotted
ymin (float, optional) – the y-axis minimum
ymax (float, optional) – the y-axis maximum
fontsize (float, optional) – fontsize
Methods
__init__
(HH[, k, xmax, ymin, ymax, fontsize])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_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