@@ -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
@@ -176,11 +173,11 @@ def get_correlated_dataset(n, dependency, mu, scale):
176173ax_nstd .scatter (x , y , s = 0.5 )
177174
178175confidence_ellipse (x , y , ax_nstd , n_std = 1 ,
179- label = r'$1\sigma$' , edgecolor = 'firebrick' )
176+ label = r'$1\sigma$' , edgecolor = 'firebrick' )
180177confidence_ellipse (x , y , ax_nstd , n_std = 2 ,
181- label = r'$2\sigma$' , edgecolor = 'fuchsia' , linestyle = '--' )
178+ label = r'$2\sigma$' , edgecolor = 'fuchsia' , linestyle = '--' )
182179confidence_ellipse (x , y , ax_nstd , n_std = 3 ,
183- label = r'$3\sigma$' , edgecolor = 'blue' , linestyle = ':' )
180+ label = r'$3\sigma$' , edgecolor = 'blue' , linestyle = ':' )
184181
185182ax_nstd .scatter (mu [0 ], mu [1 ], c = 'red' , s = 3 )
186183ax_nstd .set_title ('Different standard deviations' )
@@ -209,7 +206,7 @@ def get_correlated_dataset(n, dependency, mu, scale):
209206# Plot the ellipse with zorder=0 in order to demonstrate
210207# its transparency (caused by the use of alpha).
211208confidence_ellipse (x , y , ax_kwargs ,
212- alpha = 0.5 , facecolor = 'pink' , edgecolor = 'purple' , zorder = 0 )
209+ alpha = 0.5 , facecolor = 'pink' , edgecolor = 'purple' , zorder = 0 )
213210
214211ax_kwargs .scatter (x , y , s = 0.5 )
215212ax_kwargs .scatter (mu [0 ], mu [1 ], c = 'red' , s = 3 )
0 commit comments