Skip to content
Plotly templates

Physics — Plot: Simple Harmonic Motion

Displacement against time for an oscillator (sine curve).

Template previewPlotly
Rendering…

Make it your own.

{
  "data": [
    {"type":"scatter","mode":"lines","name":"x(t)","line":{"color":"#6366f1","width":3},
     "x":[0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5,5.5,6,6.5],
     "y":[0,0.479,0.841,0.997,0.909,0.599,0.141,-0.351,-0.757,-0.978,-0.959,-0.706,-0.279,0.215]}
  ],
  "layout": {"title":"Simple harmonic motion","xaxis":{"title":"time (s)"},"yaxis":{"title":"displacement"}}
}