File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,9 @@ def binned_mean_line(
99
99
means .append (np .mean (y_values_in_this_bin ))
100
100
standard_deviations .append (np .std (y_values_in_this_bin ))
101
101
102
- centers .append (0.5 * (x_bins [bin - 1 ].value + x_bins [bin ].value ))
102
+ # Bin center is computed as the median of the X values of the data points
103
+ # in the bin
104
+ centers .append (np .median (x [indicies_in_this_bin ].value ))
103
105
104
106
# If the number of data points in the bin is less than minimum_in_bin,
105
107
# collect these data points if needed
@@ -224,7 +226,9 @@ def binned_median_line(
224
226
medians .append (np .median (y_values_in_this_bin ))
225
227
deviations .append (np .percentile (y_values_in_this_bin , percentiles ))
226
228
227
- centers .append (0.5 * (x_bins [bin - 1 ].value + x_bins [bin ].value ))
229
+ # Bin center is computed as the median of the X values of the data points
230
+ # in the bin
231
+ centers .append (np .median (x [indicies_in_this_bin ].value ))
228
232
229
233
# If the number of data points in the bin is less than minimum_in_bin,
230
234
# collect these data points if needed
You can’t perform that action at this time.
0 commit comments