Skip to content

Commit 2cd1e02

Browse files
committed
don't rely on pylab imports
1 parent 7bfebbf commit 2cd1e02

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Gauss_Markov.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
"input": [
166166
"from matplotlib.patches import Ellipse\n",
167167
"\n",
168-
"fig, ax = subplots()\n",
168+
"fig, ax = plt.subplots()\n",
169169
"fig.set_size_inches((6,6))\n",
170170
"ax.set_aspect(1)\n",
171171
"ax.plot(bb[0,:],bb[1,:],'g.')\n",
@@ -178,9 +178,9 @@
178178
"U,S,V = linalg.svd(bm_cov) \n",
179179
"\n",
180180
"err = np.sqrt((matrix(bm))*(bm_cov)*(matrix(bm).T))\n",
181-
"theta = arccos(U[0,1])/pi*180\n",
181+
"theta = np.arccos(U[0,1])/np.pi*180\n",
182182
"\n",
183-
"ax.add_patch(Ellipse(bm,err*2/sqrt(S[0]),err*2/sqrt(S[1])\n",
183+
"ax.add_patch(Ellipse(bm,err*2/np.sqrt(S[0]),err*2/np.sqrt(S[1])\n",
184184
" ,angle=theta,color='pink',alpha=0.5))\n",
185185
"\n",
186186
"plt.show()"

0 commit comments

Comments
 (0)