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, marker_size=50, marker_style='o', xlim=None, ylim=None, plot_negative=True)[source]#

Get a matplotlib plot showing the COHP or COBI or COOP with respect to bond lengths.

Parameters:
  • ax (mpl.axes.Axes | None) – Existing Matplotlib Axes object to plot to.

  • 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

Returns:

A matplotlib object.