@@ -6870,15 +6870,15 @@ def matshow(self, Z, **kwargs):
6870
6870
6871
6871
def violinplot (self , dataset , positions = None , vert = True , widths = 0.5 ,
6872
6872
showmeans = False , showextrema = True , showmedians = False ,
6873
- points = 100 , bw_method = None , color = 'y' , line_kw = {} ,
6873
+ points = 100 , bw_method = None , color = 'y' , line_kw = None ,
6874
6874
** fill_kw ):
6875
6875
"""Make a violin plot.
6876
6876
6877
6877
Call signature::
6878
6878
6879
6879
violinplot(dataset, positions=None, vert=True, widths=0.5,
6880
6880
showmeans=False, showextrema=True, showmedians=False,
6881
- points=100, bw_method=None, color='y', line_kw={} ,
6881
+ points=100, bw_method=None, color='y', line_kw=None ,
6882
6882
**fill_kw):
6883
6883
6884
6884
Make a violin plot for each column of *dataset* or each vector in
@@ -6986,14 +6986,14 @@ def _kde_method(X, coords):
6986
6986
6987
6987
def violin (self , vpstats , positions = None , vert = True , widths = 0.5 ,
6988
6988
showmeans = False , showextrema = True , showmedians = False ,
6989
- color = 'y' , line_kw = {} , ** fill_kw ):
6989
+ color = 'y' , line_kw = None , ** fill_kw ):
6990
6990
"""Drawing function for violin plots.
6991
6991
6992
6992
Call signature::
6993
6993
6994
6994
violin(vpstats, positions=None, vert=True, widths=0.5,
6995
6995
showmeans=False, showextrema=True, showmedians=False,
6996
- color='y', line_kw={} , **fill_kw):
6996
+ color='y', line_kw=None , **fill_kw):
6997
6997
6998
6998
Draw a violin plot for each column of `vpstats`. Each filled area
6999
6999
extends to represent the entire data range, with optional lines at the
@@ -7124,6 +7124,9 @@ def violin(self, vpstats, positions=None, vert=True, widths=0.5,
7124
7124
elif len (color ) != N :
7125
7125
raise ValueError (datashape_message .format ("color" ))
7126
7126
7127
+ if line_kw is None :
7128
+ line_kw = {}
7129
+
7127
7130
# original default values for line color and alpha
7128
7131
line_color = line_kw .pop ('colors' , 'r' )
7129
7132
alpha = fill_kw .pop ('alpha' , 0.3 )
0 commit comments