import numpy as np
import matplotlib.pyplot as mp
from scipy import stats
x=np.linspace(-4,4,500)
mp.figure('Normal and t Distribution',facecolor='lightgray')
mp.title('Normal Distribution',fontsize=20)
mp.xlabel('x',fontsize=14)
mp.ylabel('y',fontsize=14)
mp.tick_params(labelsize=10)
mp.grid(linestyle=':')
mp.plot(x,stats.norm.pdf(x),label='Normal')
mp.show()
mp.title('t Distribution',fontsize=20)
mp.plot(x,stats.t.pdf (x,5),label='n=5')
mp.plot(x,stats.t.pdf (x,30),label='n=30')
mp.legend()
mp.show()