Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- import numpy as np; np.random.seed(42)
- x = np.linspace(0,1)
- y = np.random.rand(len(x))
- fig, ax = plt.subplots()
- ax.step(x,y)
- # or
- # ax.plot(x,y, drawstyle="steps")
- plt.show()
Add Comment
Please, Sign In to add comment