Closedown

This commit is contained in:
2016-04-20 10:46:45 +02:00
parent af47f02939
commit 32d273977f

View File

@@ -23,8 +23,13 @@ def fit(ydata, xdata = None, draw_plot = True):
fit_x = frange(scale_x[0],scale_x[1],resolution, True)
for x in fit_x:
fit_y.append(fitted_gaussian_function.value(x))
p.addSeries(LinePlotSeries("fit"))
p.getSeries(1).setData(fit_x, fit_y)
if p is not None:
p.addSeries(LinePlotSeries("fit"))
p.getSeries(1).setData(fit_x, fit_y)
else:
#For remote
p = plot([ydata,fit_y],["data","fit"],[xdata,fit_x], title="Fit" )[0]
draw_plot = False
if abs(mean - xdata[index_max]) < abs((scale_x[0] + scale_x[1])/2):
if draw_plot: