Skip to content

Instantly share code, notes, and snippets.

@aambrioso1
Created January 12, 2020 04:54
Show Gist options
  • Save aambrioso1/7385f694a9c1bc83259ab2cf02067084 to your computer and use it in GitHub Desktop.
Save aambrioso1/7385f694a9c1bc83259ab2cf02067084 to your computer and use it in GitHub Desktop.
plottest.py
import matplotlib.pyplot as plt
import numpy as np
data = np.arange(10)
print(data)
plt.plot(data)
fig = plt.figure()
ax1 = fig.add_subplot(2, 2, 1)
ax2 = fig.add_subplot(2, 2, 2)
ax3 = fig.add_subplot(2, 2, 3)
plt.plot(np.random.randn(50).cumsum(), 'k--')
ax1.hist(np.random.randn(100), bins=20, color='K', alpha=0.3)
ax2.scatter(np.arange(30), np.arange(30) + 3 * np.random.randn(30))
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment