PAOFLOW.graphics.plot_functions#
Functions#
|
|
|
|
|
|
|
Plot one or more band structures for comparison. |
|
|
|
|
|
|
|
|
|
Overlay an arbitrary selection of optical spectra on a single axis. |
|
Display a solid swatch of the perceived visible color of a material. |
|
Plot a phonon dispersion, optionally with a side density-of-states panel. |
|
Plot the mode Grueneisen parameters along a q-path (dispersion style). |
|
Plot the harmonic thermal properties as a function of temperature. |
|
Plot the quasi-harmonic quantities as a function of temperature. |
|
Plot a broadened infrared spectrum, optionally with the mode sticks. |
|
Plot a broadened Raman spectrum, optionally with the mode sticks. |
Module Contents#
- PAOFLOW.graphics.plot_functions.plot_dos(es, dos, title, x_lim, y_lim, vertical, col, x_label=None, y_label=None)[source]#
- PAOFLOW.graphics.plot_functions.plot_pdos(es, dos, title, x_lim, y_lim, vertical, cols, labels, legend)[source]#
- PAOFLOW.graphics.plot_functions.plot_weighted_bands(outputdir, bands, sym_points, title, cbar_label, label, filename, y_lim, col)[source]#
- PAOFLOW.graphics.plot_functions.plot_bands(bands, sym_points, title, label, y_lim, col, labels=None, legend=True)[source]#
Plot one or more band structures for comparison.
- Arguments:
bands: ndarray (nbands, nkpts) or list of such arrays. col: single color or list of colors, one per dataset. labels: optional list of legend labels, one per dataset. legend: show legend when labels are provided (default True).
- PAOFLOW.graphics.plot_functions.plot_dos_beside_bands(es, dos, bands, sym_points, title, band_label, x_lim, y_lim, col, dos_ticks)[source]#
- PAOFLOW.graphics.plot_functions.plot_berry_under_bands(berry, bands, sym_points, title, band_label, berry_label, x_lim, y_lim, col, dos_ticks)[source]#
- PAOFLOW.graphics.plot_functions.plot_tensor(enes, tensors, eles, title, x_lim, y_lim, x_lab, y_lab, col, legend, min_zero=False)[source]#
- PAOFLOW.graphics.plot_functions.plot_shc_tensor(enes, shc, title, x_lim, y_lim, x_lab, y_lab, cols, labels, legend, legend_outside=False)[source]#
- PAOFLOW.graphics.plot_functions.plot_optical(curves, title, x_lim, y_lim, x_label, y_label, cols=None, legend=True)[source]#
Overlay an arbitrary selection of optical spectra on a single axis.
This is the generic renderer behind the user-facing optical-property selection (dielectric function, refractive index, absorption, reflectivity, optical conductivity and emissivity). Each curve may carry its own abscissa, so spectra sampled on the photon-energy grid and the total-emissivity-versus-temperature curve can both be drawn through the same entry point.
- Arguments:
- curves (list): Sequence of
(x, y, label)tuples, one per spectrum. xandyare 1D arrays of equal length;labelis the legend text (may beNone).
title (str): Figure title (defaults to
'Optical properties'). x_lim (tuple):(x_min, x_max)axis limits, orNone. y_lim (tuple):(y_min, y_max)axis limits, orNone. x_label (str): X-axis label (defaults to'Energy (eV)'). y_label (str): Y-axis label (defaults to'Optical response'). cols (str/tuple or list): A single color applied to every curve, or alist of colors (one per curve).
Nonelets matplotlib cycle.legend (bool): Show the legend when any curve carries a label.
- curves (list): Sequence of
- PAOFLOW.graphics.plot_functions.plot_color_swatch(rgb01, hexstr=None, title=None, label=None)[source]#
Display a solid swatch of the perceived visible color of a material.
- Arguments:
rgb01 (sequence): sRGB color components in [0, 1]. hexstr (str): Optional hex string annotated on the swatch (e.g. ‘#rrggbb’). title (str): Figure title (defaults to ‘Perceived color’). label (str): Optional text drawn above the hex value (e.g. the material).
- PAOFLOW.graphics.plot_functions.plot_phonons(distances, frequencies, ticks=None, dos=None, title=None, y_lim=None, col='black', units='THz', filename=None)[source]#
Plot a phonon dispersion, optionally with a side density-of-states panel.
- Arguments:
distances (ndarray): 1D array of cumulative path distances. frequencies (ndarray): 2D array (nq, nbranch) of phonon frequencies. ticks (tuple): Optional (positions, labels) for high-symmetry points. dos (tuple): Optional (frequency, dos) arrays for a side DOS panel. title (str): Plot title. y_lim (tuple): Frequency axis limits (y_min, y_max). col (str or tuple): Line colour. units (str): Frequency unit string for the axis label. filename (str): If given, save the figure to this path.
- PAOFLOW.graphics.plot_functions.plot_gruneisen_band(distances, gruneisen, ticks=None, title=None, y_lim=None, col='black', filename=None)[source]#
Plot the mode Grueneisen parameters along a q-path (dispersion style).
- Arguments:
distances (ndarray): 1D array of cumulative path distances. gruneisen (ndarray): 2D array (nq, nbranch) of mode Grueneisen parameters. ticks (tuple): Optional (positions, labels) for high-symmetry points. title (str): Plot title. y_lim (tuple): Grueneisen-axis limits (y_min, y_max). col (str or tuple): Line colour. filename (str): If given, save the figure to this path.
- PAOFLOW.graphics.plot_functions.plot_phonon_thermal(temperatures, free_energy, entropy, heat_capacity, title=None, filename=None)[source]#
Plot the harmonic thermal properties as a function of temperature.
- Arguments:
temperatures (ndarray): 1D array of temperatures (K). free_energy (ndarray): Helmholtz free energy (kJ/mol). entropy (ndarray): Entropy (J/K/mol). heat_capacity (ndarray): Constant-volume heat capacity (J/K/mol). title (str): Plot title. filename (str): If given, save the figure to this path.
- PAOFLOW.graphics.plot_functions.plot_qha(temperatures, volume=None, thermal_expansion=None, bulk_modulus=None, heat_capacity=None, gruneisen=None, ev=None, title=None, filename=None)[source]#
Plot the quasi-harmonic quantities as a function of temperature.
Each supplied quantity is drawn in its own panel;
Nonepanels are skipped. Passev=(volumes, energies)to include the static E-V curve.- Arguments:
temperatures (ndarray): 1D array of temperatures (K). volume (ndarray): Equilibrium volume V(T) (Angstrom^3). thermal_expansion (ndarray): Volumetric thermal expansion alpha(T) (1/K). bulk_modulus (ndarray): Isothermal bulk modulus B(T) (GPa). heat_capacity (ndarray): Constant-pressure heat capacity Cp(T) (J/K/mol). gruneisen (ndarray): Thermodynamic Gruneisen parameter gamma(T). ev (tuple): Optional (volumes, energies) static E-V data (Angstrom^3, eV). title (str): Overall figure title. filename (str): If given, save the figure to this path.
- PAOFLOW.graphics.plot_functions.plot_ir_spectrum(frequencies, intensities, modes=None, title=None, x_lim=None, col='black', units='cm-1', filename=None)[source]#
Plot a broadened infrared spectrum, optionally with the mode sticks.
- Arguments:
frequencies (ndarray): 1D array of frequencies for the broadened curve. intensities (ndarray): 1D array of broadened intensities. modes (tuple): Optional (mode_freq, mode_intensity) arrays drawn as
vertical sticks at the discrete mode positions.
title (str): Plot title. x_lim (tuple): Frequency axis limits (x_min, x_max). col (str or tuple): Line colour. units (str): Frequency unit string for the axis label. filename (str): If given, save the figure to this path.
- PAOFLOW.graphics.plot_functions.plot_raman_spectrum(frequencies, intensities, modes=None, title=None, x_lim=None, col='black', units='cm-1', filename=None)[source]#
Plot a broadened Raman spectrum, optionally with the mode sticks.
- Arguments:
frequencies (ndarray): 1D array of frequencies for the broadened curve. intensities (ndarray): 1D array of broadened intensities. modes (tuple): Optional (mode_freq, mode_intensity) arrays drawn as
vertical sticks at the discrete mode positions.
title (str): Plot title. x_lim (tuple): Frequency axis limits (x_min, x_max). col (str or tuple): Line colour. units (str): Frequency unit string for the axis label. filename (str): If given, save the figure to this path.