pymatgen.apps.battery.plotter module

This module provides plotting capabilities for battery related applications.

class VoltageProfilePlotter(xaxis='capacity')[source]

Bases: object

A plotter to make voltage profile plots for batteries.

Parameters

xaxis – The quantity to use as the xaxis. Can be either capacity (the default), or the frac_x.

add_electrode(electrode, label=None)[source]

Add an electrode to the plot.

Parameters
  • electrode – An electrode. All electrodes satisfying the AbstractElectrode interface should work.

  • label – A label for the electrode. If None, defaults to a counting system, i.e. ‘Electrode 1’, ‘Electrode 2’, …

get_plot(width=8, height=8)[source]

Returns a plot object.

Parameters
  • width – Width of the plot. Defaults to 8 in.

  • height – Height of the plot. Defaults to 6 in.

Returns

A matplotlib plot object.

get_plot_data(electrode)[source]
save(filename, image_format='eps', width=8, height=6)[source]

Save the plot to an image file.

Parameters
  • filename – Filename to save to.

  • image_format – Format to save to. Defaults to eps.

show(width=8, height=6)[source]

Show the voltage profile plot.

Parameters
  • width – Width of the plot. Defaults to 8 in.

  • height – Height of the plot. Defaults to 6 in.