3 Topics

Member Avatar for
Member Avatar for reham.mostafa.14268

I have a 2D contour plot and I want to fit it with 2D Gaussian. This is the script I used to plot the 2D contour. import numpy as np from pylab import * from scipy.stats import kde x = np.genfromtxt("deltaDEC.dat",delimiter="\n") y = np.genfromtxt("cosDEC.dat",delimiter="\n") n = len(x) H, xedges, yedges …

0
102
Member Avatar for ronbarak

When I try to save a pylab plot (either from the GUI or with `pylab.savefig`), I get the error at the bottom. A minimal script that demonstrates the problem is: import pylab pylab.savefig("foo.png") A Google search for `IndexError: Unexpected SeqBase<T> length` did produce some results, none of them hinting how …

0
145
Member Avatar for lagspike

A simple physics graph... [code=python]import pylab a_time = range(0,141,10) a_R = [3.0,2.8,2.56,2.36,2.2,2.0,1.86,1.7,1.6,1.43,1.3,1.2,1.1,1.06,0.96] for i in range(0,15): pylab.plot(a_time[i],a_R[i], 'x') pylab.errorbar(a_time[i], a_R[i], 0.5, 0.05) pylab.show() [/code] I'm guessing the [icode]pylab.plot[/icode] line isn't needed, but even with this there is nothing connecting the plots together. I'm pretty sure there wasn't anything extra needed …

Member Avatar for lagspike
0
267

The End.