@@ -70,11 +70,8 @@ def confidence_ellipse(x, y, ax, n_std=3.0, facecolor='none', **kwargs):
7070 # two-dimensionl dataset.
7171 ell_radius_x = np .sqrt (1 + pearson )
7272 ell_radius_y = np .sqrt (1 - pearson )
73- ellipse = Ellipse ((0 , 0 ),
74- width = ell_radius_x * 2 ,
75- height = ell_radius_y * 2 ,
76- facecolor = facecolor ,
77- ** kwargs )
73+ ellipse = Ellipse ((0 , 0 ), width = ell_radius_x * 2 , height = ell_radius_y * 2 ,
74+ facecolor = facecolor , ** kwargs )
7875
7976 # Calculating the stdandard deviation of x from
8077 # the squareroot of the variance and multiplying
@@ -178,11 +175,11 @@ def get_correlated_dataset(n, dependency, mu, scale):
178175ax_nstd .scatter (x , y , s = 0.5 )
179176
180177confidence_ellipse (x , y , ax_nstd , n_std = 1 ,
181- label = r'$1\sigma$' , edgecolor = 'firebrick' )
178+ label = r'$1\sigma$' , edgecolor = 'firebrick' )
182179confidence_ellipse (x , y , ax_nstd , n_std = 2 ,
183- label = r'$2\sigma$' , edgecolor = 'fuchsia' , linestyle = '--' )
180+ label = r'$2\sigma$' , edgecolor = 'fuchsia' , linestyle = '--' )
184181confidence_ellipse (x , y , ax_nstd , n_std = 3 ,
185- label = r'$3\sigma$' , edgecolor = 'blue' , linestyle = ':' )
182+ label = r'$3\sigma$' , edgecolor = 'blue' , linestyle = ':' )
186183
187184ax_nstd .scatter (mu [0 ], mu [1 ], c = 'red' , s = 3 )
188185ax_nstd .set_title ('Different standard deviations' )
@@ -213,7 +210,7 @@ def get_correlated_dataset(n, dependency, mu, scale):
213210# Plot the ellipse with zorder=0 in order to demonstrate
214211# its transparency (caused by the use of alpha).
215212confidence_ellipse (x , y , ax_kwargs ,
216- alpha = 0.5 , facecolor = 'pink' , edgecolor = 'purple' , zorder = 0 )
213+ alpha = 0.5 , facecolor = 'pink' , edgecolor = 'purple' , zorder = 0 )
217214
218215ax_kwargs .scatter (x , y , s = 0.5 )
219216ax_kwargs .scatter (mu [0 ], mu [1 ], c = 'red' , s = 3 )
0 commit comments