@@ -150,10 +150,7 @@ def make_2d(a):
150
150
return a
151
151
152
152
153
- def kde2plot_op (ax , x , y , grid = 200 , cmap = None ):
154
-
155
- if cmap is None :
156
- cmap = plt .cm .gist_earth_r
153
+ def kde2plot_op (ax , x , y , grid = 200 , ** kwargs ):
157
154
158
155
xmin = x .min ()
159
156
xmax = x .max ()
@@ -167,8 +164,7 @@ def kde2plot_op(ax, x, y, grid=200, cmap=None):
167
164
kernel = kde .gaussian_kde (values )
168
165
Z = np .reshape (kernel (positions ).T , X .shape )
169
166
170
- ax .imshow (np .rot90 (Z ), cmap = cmap ,
171
- extent = [xmin , xmax , ymin , ymax ])
167
+ ax .imshow (np .rot90 (Z ), extent = [xmin , xmax , ymin , ymax ], ** kwargs )
172
168
173
169
174
170
def kdeplot (data , ax = None ):
@@ -178,10 +174,10 @@ def kdeplot(data, ax=None):
178
174
return ax
179
175
180
176
181
- def kde2plot (x , y , grid = 200 , ax = None , cmap = None ):
177
+ def kde2plot (x , y , grid = 200 , ax = None , ** kwargs ):
182
178
if ax is None :
183
179
f , ax = plt .subplots (1 , 1 , squeeze = True )
184
- kde2plot_op (ax , x , y , grid , cmap )
180
+ kde2plot_op (ax , x , y , grid , ** kwargs )
185
181
return ax
186
182
187
183
0 commit comments