Charge
- class hubbard.plot.Charge(HH, ext_geom=None, spin=[0, 1], realspace=False, **kwargs)[source]
Bases:
hubbard.plot.plot.GeometryPlot
Plot the total charge for the
hubbard.HubbardHamiltonian
object\(\langle n_{\uparrow}\rangle+\langle n_{\downarrow}\rangle\)
or the charge for a particular spin-channel (\(\langle n_{\uparrow}\rangle\)) by specifying the spin index.
- Parameters
HH (hubbard.HubbardHamiltonian) – mean-field Hubbard Hamiltonian
ext_geom (sisl.Geometry, optional) – usually sp2 carbon-like systems are saturated with Hydrogen atoms, that don’t play a role in the Hubbard Hamiltonian. If ext_geom is passed it plots the full sp2 carbon system otherwise it only uses the geometry associated to the
hubbard.HubbardHamiltonian
(carbon backbone)spin (int or array_like, optional:) – plot charge associated to one specific spin index, or both if
spin=[0,1]
realspace (bool, optional) – if True it plots the total charge in a realspace grid. In other case it will be plotted as Mulliken populations If True either a
sisl.SuperCell
(sc kwarg) or the z kwarg to slice the real space grid at the desired z coordinate needs to be passed
Methods
__init__
(HH[, ext_geom, spin, realspace])add_colorbar
(layer[, pos, size])Add figure colorbar
annotate
([sites, size])Annotate the site indices in the pi-network
close
()Close figure
legend
(**kwargs)Add legend to figure.
savefig
(fn)Save figure to external file
set_axes
([bdx])set_colorbar_xlabel
(label[, fontsize])set_colorbar_xticklabels
([labels, fontsize])set_colorbar_xticks
(ticks)set_colorbar_ylabel
(label[, fontsize])set_colorbar_yticklabels
([labels, fontsize])set_colorbar_yticks
(ticks)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 %
- annotate(sites=[], size=6)
Annotate the site indices in the pi-network
- Parameters
sites (array_like, optional) – specify sites to be annotated in figure
size (int, optional) – font size for the annotation
- close()
Close figure
- get_colorbar_xticks()
- get_colorbar_yticks()
- 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_axes(bdx=2)
- set_colorbar_xlabel(label, fontsize=20)
- set_colorbar_xticklabels(labels=None, fontsize=20)
- set_colorbar_xticks(ticks)
- set_colorbar_ylabel(label, fontsize=20)
- set_colorbar_yticklabels(labels=None, fontsize=20)
- set_colorbar_yticks(ticks)
- 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