BWDFPlotter#
- class lobsterpy.plotting.BWDFPlotter(are_coops=False, are_cobis=False)[source]#
Bases:
object
Plotter to generate Bond weighted distribution functions using ICOHP or ICOBI or ICOOP as weights.
- Parameters:
are_coops (bool) – Bool indicating that populations are ICOOPs, not ICOHPs. Defaults to False, i.e., ICOHPs are plotted.
are_cobis (bool) – Bool indicating that populations are ICOBIs, not ICOHPs. Defaults to False, i.e., ICOHPs are plotted.
- add_bwdf(label, bwdf)[source]#
Add bond weighted distribution function (BWDF) for plotting.
- Parameters:
label (str) – Label for the BWDF. Must be unique.
bwdf (dict) – dict containing BWDF data as obtained from FeaturizeIcoxxlist.calc_bwdf() or FeaturizeIcoxxlist.calc_site_bwdf()
- get_plot(ax=None, colors=None, plot_negative=True, sigma=None, xlim=None, ylim=None)[source]#
Get a matplotlib plot showing the bond weighted distribution function (BWDF).
- Parameters:
ax (Axes | None) – Existing Matplotlib Axes object to plot to.
colors (list[str] | None) – list of hex color codes to be used in plot
plot_negative (bool) – Will plot -1*ICOHPs. Works only for ICOHPs
sigma (float | None) – Standard deviation of Gaussian broadening applied to distribution data. If ,None no broadening will be added.
xlim (tuple[float, float] | None) – Specifies the x-axis limits. Defaults to None for automatic determination.
ylim (tuple[float, float] | None) – Specifies the y-axis limits. Defaults to None for automatic determination.
- Returns:
A matplotlib object.