IcohpDistancePlotter#
- class lobsterpy.plotting.IcohpDistancePlotter(are_coops=False, are_cobis=False)[source]#
Bases:
object
Plotter to generate ICOHP or ICOBI or ICOOP vs bond lengths plots.
- Parameters:
are_coops (bool) – Bool indicating that populations are ICOOPs, not ICOHPs. Defaults to False for COHPs.
are_cobis (bool) – Bool indicating that populations are ICOBIs, not ICOHPs. Defaults to False for COHPs.
- add_icohps(label, icohpcollection)[source]#
Add ICOHPs or ICOBIs or ICOOPS for plotting.
- Parameters:
label (str) – Label for the ICOHPs. Must be unique.
icohpcollection (IcohpCollection) – IcohpCollection object.
- get_plot(ax=None, alpha=0.4, marker_size=50, marker_style='o', xlim=None, ylim=None, plot_negative=True, colors=None, color_interactions=False)[source]#
Get a matplotlib plot showing the COHP or COBI or COOP with respect to bond lengths.
- Parameters:
ax (Axes | None) – Existing Matplotlib Axes object to plot to.
alpha (float) – sets the transparency of markers in scatter plots
marker_size (float) – sets the size of markers in scatter plots
marker_style (str) – sets type of marker used in plot
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.
plot_negative (bool) – Will plot -1*ICOHPs. Works only for ICOHPs
colors (list[str] | None) – list of hex color codes to be used in plot
color_interactions (bool) – If True, will color the interactions based on atom types
- Returns:
A matplotlib object.