From: Sudheer J. <sud...@ya...> - 2016-01-07 09:37:44
|
Dear experts, I tried to use the matplotlib function plt.xcorr for calculating cross correlation between to check its functionality using the data from a standard example given in R web site example. https://onlinecourses.science.psu.edu/stat510/node/74 However when the example given above is replicated using python I get a totally different graph. Any idea why this happens? I tried normed=True but do not appears to have any effect. Any advice on this will be of extreme help import urllib as web from matplotlib import pylab as plt f=web.urlopen('http://anson.ucdavis.edu/~shumway/soi.dat') soi=[] for line in f: soi.append(float(line.strip())) f.close() rec=[] f=web.urlopen('http://anson.ucdavis.edu/~shumway/recruit.dat') for line in f: rec.append(float(line.strip())) ax=plt.figure() anl_ccf=plt.xcorr(soi,rec,maxlags=30) plt.show() With best regards, Sudheer |