Permalink
Browse files

Add stairstep plot example

  • Loading branch information...
dmcdougall committed Aug 10, 2012
1 parent 861190a commit c5c4dcaac3ca71dda819c6ced4fa026847a6cc22
Showing with 10 additions and 0 deletions.
  1. +10 −0 examples/pylab_examples/stairs_demo.py
@@ -0,0 +1,10 @@
+import numpy as np
+from matplotlib import pyplot as plt
+
+x = np.linspace(-2*np.pi, 2*np.pi, num=40, endpoint=True)
+y = np.sin(x)
+
+fig = plt.figure()
+ax = fig.add_subplot(1, 1, 1)
+ax.stairs(x, y)
+plt.show()

0 comments on commit c5c4dca

Please sign in to comment.