Previous topic

Dynamic Plot

Next topic

Plot 2D

This Page

Plot

pybamm.plot(x, y, xlabel=None, ylabel=None, title=None, testing=False, **kwargs)[source]

Generate a simple 1D plot. Calls matplotlib.pyplot.plot with keyword arguments ‘kwargs’. For a list of ‘kwargs’ see the matplotlib plot documentation

Parameters:
  • x (pybamm.Array) – The array to plot on the x axis
  • y (pybamm.Array) – The array to plot on the y axis
  • xlabel (str, optional) – The label for the x axis
  • ylabel (str, optional) – The label for the y axis
  • testing (bool, optional) – Whether to actually make the plot (turned off for unit tests)