Analyze data using FFT

Read sunspot data s from file sunspot.dat, calculate the FFT of s, and graph the amplitudes and phases

     read sunspot.dat year s
     window 5
     set xlabel 'year'
     set ylabel 's'
     graph year s
     m = fft(s)
     window 6
     set ylabel 'amplitudes'
     graph m[*,2]
     window 7
     set ylabel 'phases'
     graph m[*,1]

Define and plot a function
Display array data as contours and density plot