Bonds

class hubbard.plot.Bonds(G, annotate=False, R=1.5, **kwargs)[source]

Bases: hubbard.plot.plot.Plot

Plot bonds between atoms in geometry

Parameters
  • G (sisl.Geometr, sisl.Hamiltonian, or hubbard.HubbardHamiltonian) – Geometry to be plotted

  • annotate (bool, optional) – if True it annotates the value of the distance between atoms in the plot

  • R (float or array_like) – minimum and maximum distance between atoms to consider in the plot Defaults to R=1.5 AA since typically we consider sp2 carbon systems

Methods

__init__(G[, annotate, R])

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

set_title(title, fontsize=16)

Set figure title

Parameters
  • title (str) – figure title

  • fontsize (int, optional) – title fontsize, defaults to 16

set_xlabel(label, fontsize=16)

Set label for the x-axis

Parameters
  • label (str) – label for the x-axis

  • fontsize (int, optional) – label fontsize

set_xlim(xmin, xmax)

Set maximum and minimum x-axis values

Parameters
  • xmin (float) – minimum value to show in the x-axis

  • xmax (float) – maximum value to show in the x-axis

set_ylabel(label, fontsize=16)

Set label for the y-axis

Parameters
  • label (str) – label for the y-axis

  • fontsize (int, optional) – label fontsize

set_ylim(ymin, ymax)

Set maximum and minimum y-axis values

Parameters
  • ymin (float) – minimum value to show in the y-axis

  • ymax (float) – maximum value to show in the y-axis