Plotting#
Plot observations, fitted curves, residuals, compound summaries, asymptotes, and evaluated points with Matplotlib.
CurvePoint#
plot_fits#
- bindcurve.plot_fits(data, results, *, compounds=None, ax=None, experiments=None, show_markers=True, marker_kind='o', marker_size=5.0, show_curves=True, curve_width=1.0, curve_style='-', show_errorbars=True, errorbar_kind='sd', errorbar_linewidth=1.0, errorbar_capsize=3.0, colors=None, x_grid=None, n_points=300, xscale='log', confidence_band=False, confidence_level=0.95, confidence_band_kwargs=None)[source]#
Plot observations and fitted curves for each independent experiment.
Optional confidence bands are covariance-based pointwise confidence bands around the fitted mean curve for each experiment-level fit.
- Parameters:
data (DoseResponseData)
results (FitResults)
ax (Axes | None)
show_markers (bool)
marker_kind (str)
marker_size (float)
show_curves (bool)
curve_width (float)
curve_style (str)
show_errorbars (bool)
errorbar_kind (str)
errorbar_linewidth (float)
errorbar_capsize (float)
colors (object | None)
x_grid (ndarray | None)
n_points (int)
xscale (Literal['log', 'linear', None])
confidence_band (bool)
confidence_level (float)
confidence_band_kwargs (dict | None)
- Return type:
plot_compounds#
- bindcurve.plot_compounds(data, results, *, compounds=None, ax=None, show_markers=True, marker_kind='o', marker_size=5.0, show_curves=True, curve_width=1.0, curve_style='-', dose_representation='mean', show_errorbars=True, errorbar_kind='sd', errorbar_linewidth=1.0, errorbar_capsize=3.0, colors=None, x_grid=None, n_points=300, xscale='log')[source]#
Plot one summary dose-response curve per compound.
A plotted series is one compound. Markers and fitted curve share one label and one base color by default. The curve is the pointwise arithmetic mean of the successful experiment-level fitted predictions; failed fits are excluded. Plotting never fits or modifies data. Grand-mean or experiment-level observations are selected with
dose_representation.- Parameters:
data (DoseResponseData)
results (FitResults)
ax (Axes | None)
show_markers (bool)
marker_kind (str)
marker_size (float)
show_curves (bool)
curve_width (float)
curve_style (str)
dose_representation (str)
show_errorbars (bool)
errorbar_kind (str)
errorbar_linewidth (float)
errorbar_capsize (float)
colors (object | None)
x_grid (ndarray | None)
n_points (int)
xscale (Literal['log', 'linear', None])
- Return type:
plot_residuals#
- bindcurve.plot_residuals(data, results, *, compound_id=None, ax=None, experiments=None, aggregate=True, standardized=False, xscale='log', zero_line=True, label=None, zero_line_kwargs=None, **scatter_kwargs)[source]#
Plot fit residuals against concentration on an existing axes.
Residuals are computed as
observed - predicted. Setstandardizedto divide them by known observation sigma. By default, technical replicates are aggregated in the same way as fitted observations.
plot_asymptotes#
plot_curve_points#
- bindcurve.plot_curve_points(data, results, *, points, compound_id=None, ax=None, experiments=None, annotate=True, annotation_offset=(6.0, 6.0), point_kwargs=None, annotation_kwargs=None)[source]#
Plot arbitrary labeled points evaluated on fitted curves.