suboptimumg.plotting.plot_polynomial_fit#

suboptimumg.plotting.plot_polynomial_fit(x, y, coeffs, title, x_label, y_label, *, subtitle=None, timestamps=None, 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'), font_config=FontConfig(large=24, medium=16, small=12))[source]#

Generic scatter plot with a polynomial fit line overlaid.

Parameters:
  • x (NDArray[np.float64]) – X-axis data for scatter points.

  • y (NDArray[np.float64]) – Y-axis data for scatter points.

  • coeffs (NDArray[np.float64]) – Polynomial coefficients in descending power order (compatible with np.polyval).

  • title (str) – Plot title.

  • x_label (str) – X-axis label.

  • y_label (str) – Y-axis label.

  • subtitle (str, optional) – Subtitle shown below the title in smaller grey text.

  • layout_config (LayoutConfig) – Layout dimensions and spacing configuration.

  • font_config (FontConfig) – Font size configuration.

  • timestamps (ndarray[tuple[Any, ...], dtype[float64]] | None)

Return type:

go.Figure