regression_plot

Contents

regression_plot#

class braintools.visualize.regression_plot(x, y, fit_line=True, confidence_interval=True, ax=None, figsize=(10, 6), color='blue', alpha=0.7, xlabel='X', ylabel='Y', title=None, **kwargs)#

Create regression plot with fitted line and confidence interval.

Parameters:
  • x (ndarray) – Data arrays.

  • y (ndarray) – Data arrays.

  • fit_line (bool) – Whether to fit regression line.

  • confidence_interval (bool) – Whether to show confidence interval.

  • ax (Axes | None) – Axes to plot on.

  • figsize (Tuple[float, float]) – Figure size if creating new figure.

  • color (str) – Plot color.

  • alpha (float) – Alpha transparency.

  • xlabel (str) – Axis labels and title.

  • ylabel (str) – Axis labels and title.

  • title (str | None) – Axis labels and title.

  • **kwargs – Additional arguments passed to scatter.

Returns:

ax – The axes object containing the plot.

Return type:

Axes