# -*- coding: utf-8 -*-
"""
Created on Wed May 13 11:44:47 2015

@author: Lalecia
"""


import numpy as np
import matplotlib.pyplot as plt
from scipy.fftpack import fft #or fft

DataIN = np.loadtxt('sunspots.txt')

t = DataIN[:,0]
y = DataIN[:,1]

coef =  fft(y)

plt.plot(t,abs(coef))
86ce3ee0b18ab1b66aa49b74bd0e4cb308bebb17
<mask token>

<mask token>
plt.plot(t, abs(coef))

<mask token>
DataIN = np.loadtxt('sunspots.txt')
t = DataIN[:, 0]
y = DataIN[:, 1]
coef = fft(y)
plt.plot(t, abs(coef))

<mask token>
import numpy as np
import matplotlib.pyplot as plt
from scipy.fftpack import fft
DataIN = np.loadtxt('sunspots.txt')
t = DataIN[:, 0]
y = DataIN[:, 1]
coef = fft(y)
plt.plot(t, abs(coef))

# -*- coding: utf-8 -*-
"""
Created on Wed May 13 11:44:47 2015

@author: Lalecia
"""


import numpy as np
import matplotlib.pyplot as plt
from scipy.fftpack import fft #or fft

DataIN = np.loadtxt('sunspots.txt')

t = DataIN[:,0]
y = DataIN[:,1]

coef =  fft(y)

plt.plot(t,abs(coef))