Skip to content

Instantly share code, notes, and snippets.

@nsmith5
Created June 28, 2016 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nsmith5/2e57ce209c7f65f2dce1ea612cd62601 to your computer and use it in GitHub Desktop.
Save nsmith5/2e57ce209c7f65f2dce1ea612cd62601 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
import numpy as np
import sys
def make_figure(arr):
fig = plt.figure()
ax = fig.add_subplot(111)
imag = ax.imshow(arr)
plt.savefig("output2.png")
plt.close(fig)
return None
def main():
iterations = int(sys.argv[1])
for i in range(iterations):
g = np.random.randn(1000, 1000)
make_figure(g)
return 0
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment