Plotting#
PyProBE includes plotting methods that integrate directly with popular Python visualisation
tools. Using a backend powered by Pandas and matplotlib, you can call the
plot()
method on any Result
object.
For more interactive plotting, you can use install the optional dependency hvPlot:
pip install 'PyProBE-Data[hvplot]'
This enables the hvplot()
method which creates interactive plots for
visual inspection.
The plot()
and hvplot()
interfaces are very similar. For example, the creation of a simple plot might look like:
result = cell.procedure['Procedure Name'].experiment('Experiment Name').cycle(1)
# for matplotlib
result.plot(x='Time [s]', y='Voltage [V]')
# for hvplot
result.hvplot(x='Time [s]', y='Voltage [V]')
PyProBE also includes a wrapper for the Seaborn
package. This allows you to pass any Result
object to the data
argument of any seaborn method:
from pyprobe.plot import seaborn as sns
sns.scatterplot(result, x='Time [s]', y='Voltage [V]')
Seaborn must be installed as an optional dependency:
pip install 'PyProBE-Data[seaborn]'
All of these methods are light wrappers, meaning you can refer to the original package documentation for details on methods to customise your plots further. To get started with plotting, view the example.