The result is shown in Fig.\ref{525200} below.
%matplotlib inline
is an interactive Python (iPython) '
magic command' used when running Python within a Jupyter notebook. It allows the display of data plots within the notebook.
plt.figure()
signifies the beginning of the plotting instructions specific to that figure.
plt.errorbar(angle, V_pd, xerr = None, yerr=V_pd_delta)
is the command that instructs matplotlib to generate a x-y plot with error bars (as opposed to a bar graph or scatter plot, for example). All four parameters (x, y, xerr, yerr
) are required.
linestyle
and color
are used to customize the appearance of the data points. Linestyle = None
means there are no connecting lines between points. Color
means the color of the error bar lines and caps. The standard colors are blue, green, red, cyan, magenta, yellow, black, and white (with corresponding abbreviations 'b', 'g', 'r', 'c', 'm', 'y', 'k', and 'w').
capsize
, and capthick
are used to customize the appearance of the error bars. capsize =3
sets the width of the error bars to '3' (in typesetter points), and capthick=1
sets the thickness of the drawn bars to '1' (again in typesetter points). Note that if the capsize
and capthick
commands are omitted, matplotlib will draw lines indicating the given uncertainty but will omit the bars!
plt.show()
signifies the end of the plotting instructions and causes matplotlib to plot the data.