Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. from matplotlib.backends.backend_pdf import PdfPages
  4.  
  5. x = np.random.randn(1000)
  6.  
  7. fig = plt.figure()
  8. ax = fig.add_subplot(1,1,1)
  9. ax.hist(x, 100)
  10.  
  11. ax.set_title('Normal distribution with $\mu=0, \sigma=1$')
  12.  
  13. with PdfPages('foo.pdf') as pdf:
  14. pdf.savefig(fig)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement