@@ -1322,9 +1322,7 @@ def build_dataframe(args, constructor):
1322
1322
wide_cross_name = None # will likely be "index" in wide_mode
1323
1323
value_name = None # will likely be "value" in wide_mode
1324
1324
hist2d_types = [go .Histogram2d , go .Histogram2dContour ]
1325
- hist1d_orientation = (
1326
- constructor == go .Histogram or "ecdfmode" in args or "bw_method" in args
1327
- )
1325
+ hist1d_orientation = constructor == go .Histogram or "ecdfmode" in args
1328
1326
if constructor in cartesians :
1329
1327
if wide_x and wide_y :
1330
1328
raise ValueError (
@@ -1811,7 +1809,7 @@ def infer_config(args, constructor, trace_patch, layout_patch):
1811
1809
trace_patch ["marker" ] = dict (opacity = args ["opacity" ])
1812
1810
if (
1813
1811
"line_group" in args or "line_dash" in args
1814
- ): # px.line, px.line_*, px.area, px.ecdf, px, kde
1812
+ ): # px.line, px.line_*, px.area, px.ecdf
1815
1813
modes = set ()
1816
1814
if args .get ("lines" , True ):
1817
1815
modes .add ("lines" )
@@ -1872,9 +1870,6 @@ def infer_config(args, constructor, trace_patch, layout_patch):
1872
1870
)
1873
1871
args ["histnorm" ] = args ["ecdfnorm" ]
1874
1872
1875
- if "bw_method" in args :
1876
- args ["histnorm" ] = "density"
1877
-
1878
1873
# Compute applicable grouping attributes
1879
1874
for k in group_attrables :
1880
1875
if k in args :
@@ -2107,19 +2102,6 @@ def make_figure(args, constructor, trace_patch=None, layout_patch=None):
2107
2102
elif args ["ecdfnorm" ] == "percent" :
2108
2103
group [var ] = 100.0 * group [var ] / group_sum
2109
2104
2110
- if "bw_method" in args :
2111
- from scipy .stats import gaussian_kde
2112
-
2113
- base = args ["x" ] if args ["orientation" ] == "v" else args ["y" ]
2114
- var = args ["x" ] if args ["orientation" ] == "h" else args ["y" ]
2115
- bw = args .get ("bw_method" )
2116
- group = group .sort_values (by = base )
2117
-
2118
- kernel = gaussian_kde (
2119
- dataset = group [base ], weights = group [var ], bw_method = bw
2120
- )
2121
- group [var ] = kernel .evaluate (group [base ])
2122
-
2123
2105
patch , fit_results = make_trace_kwargs (
2124
2106
args , trace_spec , group , mapping_labels .copy (), sizeref
2125
2107
)
0 commit comments