'''Graph of sin(1/x)'''

import numpy as np
import matplotlib.pyplot as plt

x1 = np.arange(0,0.2,1e-6)   # 1e-6 is a shortcut for 0.000001
x1 = x1[1:]   # Removes the first element of the array to avoid division by 0.
y1 = np.sin(1./x1);

x2 = np.arange(-0.2,0,1e-6)
y2 = np.sin(1./x2);

plt.figure()
plt.plot(x1,y1,'k',x2,y2,'k',[-0.2, 0.2],[0, 0],'k',[0, 0],[-1.2, 1.2],'k',
         0.201,0,'k>',0,1.21,'k^')
plt.axis([-0.21, 0.21, -1.3, 1.3])

plt.show()