suboptimumg.plotting.binned_scatter#

suboptimumg.plotting.binned_scatter.plot_binned_scatter(x, y, *, color_values=None, color_label='group', title='', x_label='', y_label='', n_bins=24, min_per_bin=5, reference_y=0.0, font_config=FontConfig(large=24, medium=16, small=12), layout_config=LayoutConfig(width=1000, height=700, grid_width_per_col=400, grid_height_per_row=350, grid_horizontal_spacing=0.08, grid_vertical_spacing=0.12, margin={'l': 70, 'r': 50, 't': 90, 'b': 70}, plot_bgcolor='white', scene_bgcolor='rgba(240, 240, 240, 0.8)', title_x=0.5, title_xanchor='center', title_yanchor='top'))[source]#

Scatter plot of (x, y) points, grouped into quantiles on x. Displays mean and +/- 1 std of y for each bin

Parameters:
  • x (NDArray[float64])

  • y (NDArray[float64])

  • color_values (NDArray[float64], optional) – Per-point values used to color the scatter (e.g. a group id). Defaults to None (single color).

  • color_label (str, optional) – Colorbar title when color_values is given.

  • title (str, optional) – Figure title and axis labels.

  • x_label (str, optional) – Figure title and axis labels.

  • y_label (str, optional) – Figure title and axis labels.

  • n_bins (int, optional) – Number of x-bins for the mean/sigma overlay. Default is 24.

  • min_per_bin (int, optional) – Minimum points a bin needs to be shown. Default is 5.

  • reference_y (float, optional) – Y value for a dashed horizontal reference line. Default is 0.0; pass None to omit it.

  • font_config (FontConfig, optional)

  • layout_config (LayoutConfig, optional)

Return type:

go.Figure