graph2mat.tools.viz.sparse_plot

Functions

plot_basis_matrix(matrix[, configuration, ...])

Plots a matrix where rows and columns are spherical harmonics basis functions.

graph2mat.tools.viz.sparse_plot.plot_basis_matrix(matrix: ndarray | SparseCSR | spmatrix, configuration: BasisConfiguration | Geometry | None = None, point_lines: bool | Dict = False, basis_lines: bool | Dict = False, sc_lines: bool | Dict = False, colorscale: str = 'RdBu', text: bool | str = False, basis_labels: bool = False) Figure[source]

Plots a matrix where rows and columns are spherical harmonics basis functions.

Parameters:
  • matrix – the matrix, either as a numpy array or as a sisl sparse matrix.

  • configuration – Should contain the point coordinates and types associated with the matrix. Only needed if separator lines or basis labels are requested.

  • point_lines – If a boolean, whether to draw lines separating points, using default styles. If a dict, draws the lines with the specified plotly line styles.

  • basis_lines – If a boolean, whether to draw lines separating sets of basis functions, using default styles. If a dict, draws the lines with the specified plotly line styles.

  • sc_lines – If a boolean, whether to draw lines separating the supercells, using default styles. If a dict, draws the lines with the specified plotly line styles.

  • colorscale – A plotly colorscale.

  • text – If a boolean, whether to show the value of each element as text on top of it, using plotly’s default formatting. If a string, show text with the specified format. E.g. text=”.3f” shows the value with three decimal places.

  • basis_labels – Whether to label the axes with the basis function indices. If True, the labels will be of the form “P: (l, m)”, where P is the index of the point and l and m are the indices of the spherical harmonic.