Guest User

Untitled

a guest
Jul 16th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import numpy as np; np.random.seed(42)
  3.  
  4. x = np.linspace(0,1)
  5. y = np.random.rand(len(x))
  6.  
  7. fig, ax = plt.subplots()
  8.  
  9. ax.step(x,y)
  10. # or
  11. # ax.plot(x,y, drawstyle="steps")
  12.  
  13. plt.show()
Add Comment
Please, Sign In to add comment