Skip to content

Commit

Permalink
rework matplotlib script
Browse files Browse the repository at this point in the history
  • Loading branch information
9il committed Apr 26, 2015
1 parent f31e967 commit ae8e2ed
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions examples/matplotlib/source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ void main()
--------
+/
pythonContext.sample = "data/data.txt".readData.toNumpyArray;
pythonContext.num_bins = 50;
pythonContext.py_stmts(script);
}

Expand All @@ -53,12 +54,7 @@ double[] readData(string file)
}

immutable script = `
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
num_bins = 50
ax = plt.subplot()
n, bins, patches = ax.hist(sample, num_bins, normed=1)
n, bins, patches = plt.hist(sample, num_bins, normed=1)
plt.show()
`;

0 comments on commit ae8e2ed

Please sign in to comment.