Skip to content

Commit e494d1c

Browse files
committed
move cmap to kwargs
1 parent 4ce9e2c commit e494d1c

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

pymc3/plots.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,7 @@ def make_2d(a):
150150
return a
151151

152152

153-
def kde2plot_op(ax, x, y, grid=200, cmap=None, **kwargs):
154-
155-
if cmap is None:
156-
cmap =plt.cm.gist_earth_r
153+
def kde2plot_op(ax, x, y, grid=200, **kwargs):
157154

158155
xmin = x.min()
159156
xmax = x.max()
@@ -167,8 +164,7 @@ def kde2plot_op(ax, x, y, grid=200, cmap=None, **kwargs):
167164
kernel = kde.gaussian_kde(values)
168165
Z = np.reshape(kernel(positions).T, X.shape)
169166

170-
ax.imshow(np.rot90(Z), cmap=cmap,
171-
extent=[xmin, xmax, ymin, ymax], **kwargs)
167+
ax.imshow(np.rot90(Z), extent=[xmin, xmax, ymin, ymax], **kwargs)
172168

173169

174170
def kdeplot(data, ax=None):
@@ -178,10 +174,10 @@ def kdeplot(data, ax=None):
178174
return ax
179175

180176

181-
def kde2plot(x, y, grid=200, ax=None, cmap=None, **kwargs):
177+
def kde2plot(x, y, grid=200, ax=None, **kwargs):
182178
if ax is None:
183179
f, ax = plt.subplots(1, 1, squeeze=True)
184-
kde2plot_op(ax, x, y, grid, cmap, **kwargs)
180+
kde2plot_op(ax, x, y, grid, **kwargs)
185181
return ax
186182

187183

0 commit comments

Comments
 (0)