Hi community of practice a.k.a. Prof. Hwang  ;D

i am trying to make graphing the user understand resonance


so everytime the button is pressed to determine the Xmaxplot[i] and the graph will remember to plot

coordinates,

(Hertz ,Xmaxplot[0])
(Hertz ,Xmaxplot[1])
(Hertz ,Xmaxplot[2])
(Hertz ,Xmaxplot[3]) and on to achieve understand of resonance for a particular damping first.


can advise how to do that?
currently it just plot (Hertz ,Xmaxplot[1]) then it goes on to plot (Hertz ,Xmaxplot[2]) so i am missing the previous data.