Skip to content

Commit b51d54e

Browse files
committed
Merge pull request #4966 from cpcloud/scatter-matrix-kwargs
CLN: do not use mutable default arguments
2 parents b3cb072 + e7fc7e5 commit b51d54e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pandas/tools/plotting.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ def use(self, key, value):
201201

202202

203203
def scatter_matrix(frame, alpha=0.5, figsize=None, ax=None, grid=False,
204-
diagonal='hist', marker='.', density_kwds={}, hist_kwds={},
205-
**kwds):
204+
diagonal='hist', marker='.', density_kwds=None,
205+
hist_kwds=None, **kwds):
206206
"""
207207
Draw a matrix of scatter plots.
208208
@@ -243,6 +243,9 @@ def scatter_matrix(frame, alpha=0.5, figsize=None, ax=None, grid=False,
243243

244244
marker = _get_marker_compat(marker)
245245

246+
hist_kwds = hist_kwds or {}
247+
density_kwds = density_kwds or {}
248+
246249
for i, a in zip(lrange(n), df.columns):
247250
for j, b in zip(lrange(n), df.columns):
248251
ax = axes[i, j]

0 commit comments

Comments
 (0)