Wavefunction
- class hubbard.plot.Wavefunction(HH, wf, ext_geom=None, cb_label='Phase', realspace=False, **kwargs)[source]
Bases:
hubbard.plot.plot.GeometryPlot
Plot the wavefunction with its complex phase for the
hubbard.HubbardHamiltonian
object- Parameters
HubbardHamiltonian (hubbard.hamiltonian.HubbardHamiltonian instance) – hubbard.hamiltonian object of a system
wf (array_like) – vector that contains the eigenstate to plot
ext_geom (sisl.Geometry instance) – external geometry to plot the GeometryPlot behind the wavefunction layer if no ext_geom is passed, it uses the geometry stored in the
hubbard.HubbardHamiltonian
object
Notes
If realspace kwarg is passed it plots the wavefunction in a realspace grid In this case 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 In other case the wavefunction is plotted as a scatter plot, where the size of the blobs depend on the value of the coefficient of wf on the atomic sitesMethods
__init__
(HH, wf[, ext_geom, cb_label, 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.
plot_wf
(HH, wf[, cb_label, realspace])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