Skip to content

Instantly share code, notes, and snippets.

@vext01
Created February 14, 2014 14:29
Show Gist options
  • Save vext01/9001885 to your computer and use it in GitHub Desktop.
Save vext01/9001885 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
import numpy as np
x,y = np.random.randn(2,100)
fig = plt.figure()
ax1 = fig.add_subplot(211)
ax1.acorr(x, usevlines=True, normed=True, maxlags=50, lw=2)
ax1.grid(True)
ax1.axhline(0, color='black', lw=2)
# make the points cluster
x = [ a + 1000 for a in x ]
ax2 = fig.add_subplot(212, sharex=ax1)
ax2.acorr(x, usevlines=True, normed=True, maxlags=50, lw=2)
ax2.grid(True)
ax2.axhline(0, color='black', lw=2)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment