serpentTools.plot.plot¶
-
serpentTools.plot.plot(xdata, plotData, ax=None, labels=None, yerr=None, **kwargs)¶ Shortcut plot for plotting series of labeled data onto a plot
If
plotDatais an array, it is assumed that each column represents one set of data to be plotted againstxdata. The same assumption is made foryerrif given.- Parameters
xdata (numpy.array or iterable) – Points along the x axis to plot
plotData (numpy.array or iterable) – Data to be plotted
ax (
matplotlib.axes.Axes, optional) – Ax on which to plot the data. If not provided, create a new plotlabels (None or iterable) – Labels to apply to each line drawn. This can be used to identify which bin is plotted as what line.
yerr (None or numpy.array or iterable) – Absolute error for each data point in
plotDatakwargs (dict, optional) – Addition keyword arguments to pass to
matplotlib.pyplot.plot()ormatplotlib.pyplot.errorbar()
- Returns
Ax on which the data was plotted.
- Return type
- Raises
IndexError – If
yerris notNoneand does not match the shape ofplotData