Mark Yourself Question
A student measures the speed v of a damped oscillator at times t from 0 to 12 s, with uncertainties in the array dv, and compares them with a model evaluated as v_model. The plotting code is
fig, ax = plt.subplots() ax.plot(t, v) ax.plot(t, v_model) ax.set_title('data') ax.set_xlim(0, 0.5) plt.savefig('out.png')
The student concludes that the model fits well, because in the saved figure the two curves lie almost on top of one another.
Answer all four parts.
Anatomy of a physics figure: markers with vertical uncertainty bars for the measured values, a continuous curve for the model, tick marks and numerals on both axes, axis labels carrying quantity and unit, and a legend identifying the two series.
Pendulum period against length, logarithmic axes
Unlock full course notes by signing up
Data Visualization in Python: difficulty 2
A student records the positive peak speeds vpeak at successive speed maxima of a damped oscillator, at their times t, and fits a straight line to ln[vpeak/(m/s)] against t, using
slope, intercept = np.polyfit(t, np.log(v_peak), 1)
The array v_peak contains only the measured speed maxima, not every instantaneous speed. The fit returns a gradient of -0.42 s-1 and an intercept of 1.65.