Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added stackplot example.
  • Loading branch information
dmcdougall committed Jun 19, 2012
commit 45575731c75db755d6d273d64376be4efdad4f5e
11 changes: 11 additions & 0 deletions examples/pylab_examples/stackplot_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import numpy as np
from matplotlib import pyplot as plt

fnx = lambda : np.random.randint(5, 50, 10)
y = np.row_stack((fnx(), fnx(), fnx()))
x = np.arange(10)

fig = plt.figure()
ax = fig.add_subplot(111)
ax.stackplot(x, y)
plt.show()