Commit d77d5a5a authored by Jean-Eric Campagne's avatar Jean-Eric Campagne
Browse files

bug in legend

parent ea737a5e
...@@ -52,7 +52,8 @@ def FitPolar(data, src, polar): ...@@ -52,7 +52,8 @@ def FitPolar(data, src, polar):
for i in range(1,data.shape[1]): for i in range(1,data.shape[1]):
xclean, yclean, _ = Clean(freq, data[:,i]) xclean, yclean, _ = Clean(freq, data[:,i])
rc, fcenter, deg, coeff, res, iqrn = FitPolynomial(xclean,yclean) rc, fcenter, deg, coeff, res, iqrn = FitPolynomial(xclean,yclean)
info = np.array([i+1]) polarIdx = i+1
info = np.array([polarIdx])
info = np.append(info,[fcenter]) info = np.append(info,[fcenter])
info = np.append(info,[deg]) info = np.append(info,[deg])
info = np.append(info,coeff) info = np.append(info,coeff)
...@@ -61,8 +62,8 @@ def FitPolar(data, src, polar): ...@@ -61,8 +62,8 @@ def FitPolar(data, src, polar):
idx0 = 2*i-2 idx0 = 2*i-2
idx1 = idx0 + 1 idx1 = idx0 + 1
axs[idx0].plot(freq, data[:,i],label='Phi'+str(i)+polar) axs[idx0].plot(freq, data[:,i],label='Phi'+str(polarIdx)+polar)
axs[idx0].plot(xclean, yclean,ls='--',label='Phi'+str(i)+polar+' cleaned') axs[idx0].plot(xclean, yclean,ls='--',label='Phi'+str(polarIdx)+polar+' cleaned')
axs[idx0].plot(freq,np.poly1d(coeff)(freq-fcenter),'g-',label='fit'+str(deg)) axs[idx0].plot(freq,np.poly1d(coeff)(freq-fcenter),'g-',label='fit'+str(deg))
axs[idx0].set_ylim(-np.pi,np.pi) axs[idx0].set_ylim(-np.pi,np.pi)
axs[idx0].grid() axs[idx0].grid()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment