Plot#
- pybamm.plot(x, y, ax=None, show_plot=True, **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 axisy (
pybamm.Array
) – The array to plot on the y axisax (matplotlib Axis, optional) – The axis on which to put the plot. If None, a new figure and axis is created.
show_plot (bool, optional) – Whether to show the plots. Default is True. Set to False if you want to only display the plot after plt.show() has been called.
kwargs – Keyword arguments, passed to plt.plot