Convenience function to visualize the residuals from calibrations generated by iso_generate_calibration. Uses iso_plot_data internally and additional parameters (...) can be passed to iso_plot_data.

  x = calibration_model_name(),
  calibration = last_calibration(dt),
  select_from_summary = c(R2 = adj.r.squared, RSD = sigma),
  color = signif,
  panel = term ~ .,
  panel_scales = "free",
  points = TRUE



data frame to plot data from


additional ggplot objects (e.g. geom_smooth()) that should be added to the plot PRIOR to the automatically generated layers for error bars, points and lines. Notet that to add geoms on top, please use regular iso_plot_data() + geom_smooth() + ... syntax instead.


the column or expression for the x-axis aesthetic. Can be a numeric, text or datetime column (text and datetime column labels will be automatically rotated by 90 degrees). For clarity of the plot, only one x variable or expression is allowed. Use named vector with c(new_x = x) to rename the x variable or expression on the fly. By default will show units in the axis names if there are any. If a datetime column is provided for x, parameters date_breaks (example: date_breaks = "2 hours") and date_labels can be set to fine-tune the x-axis appearance. See scale_date for additional details. Note that x can also be x = NULL for single data point plots - in this case the x axis is completely omitted.


which parameters from the fit summary to include, by default includes the adjusted R2 (renamed just R2) and the residual standard deviation (RSD), which R often calls sigma (sometimes also called residual mean standard deviation, residual standard error, root mean square error, or standard error of the regression).


variable to use for color aesthetic for the plot or constant value for the point and line color


whether to panel the data by anything. If using a single parameter (e.g. panel = panel), will generate a facet_wrap. If using a formula (e.g. panel = panel ~ . or panel = file_id ~ panel), will generate a facet_grid. The default for this parameter is to panel via facet grid by the y variable name but only if multiple y columns are provided. Otherwise will not generate any facets. If additional facet parameters are desired, please leave use facet_wrap and facet_grid diretly.


the scales parameter for the facets (if any are used)


whether to plot points (FALSE by default)