plot.precision_profile: Plot method for precision_profile objects

View source: R/precision_profile_plot.R

plot.precision_profileR Documentation

Plot method for precision_profile objects

Description

Creates publication-ready visualization of precision profile results, showing CV vs concentration with the fitted model curve.

Usage

## S3 method for class 'precision_profile'
plot(
  x,
  show_ci = TRUE,
  show_targets = TRUE,
  show_points = TRUE,
  point_alpha = 0.8,
  point_size = 3,
  line_colors = NULL,
  title = NULL,
  xlab = NULL,
  ylab = NULL,
  log_x = FALSE,
  ...
)

## S3 method for class 'precision_profile'
autoplot(
  object,
  show_ci = TRUE,
  show_targets = TRUE,
  show_points = TRUE,
  point_alpha = 0.8,
  point_size = 3,
  line_colors = NULL,
  title = NULL,
  xlab = NULL,
  ylab = NULL,
  log_x = FALSE,
  ...
)

Arguments

x

An object of class precision_profile.

show_ci

Logical; if TRUE (default), displays prediction interval bands for the fitted curve.

show_targets

Logical; if TRUE (default), displays horizontal lines at functional sensitivity target CV values.

show_points

Logical; if TRUE (default), displays the observed data points.

point_alpha

Numeric; transparency of points (0-1, default: 0.8).

point_size

Numeric; size of points (default: 3).

line_colors

Named character vector with colors for "fitted", "ci", and "target". Defaults to a clean color scheme.

title

Character; plot title. If NULL (default), generates an automatic title.

xlab

Character; x-axis label. If NULL, uses "Concentration".

ylab

Character; y-axis label. If NULL, uses "CV (%)".

log_x

Logical; if TRUE, uses logarithmic scale for x-axis (default: FALSE).

...

Additional arguments (currently ignored).

object

An object of class precision_profile.

Details

The precision profile plot displays:

  • Observed points: CV values at each tested concentration

  • Fitted curve: Model-predicted CV across the concentration range

  • Prediction intervals: Confidence bands showing uncertainty

  • Target lines: Horizontal lines at functional sensitivity thresholds

The plot helps visualize:

  • How measurement precision changes with concentration

  • Model fit quality (points should follow the curve)

  • Functional sensitivity estimates (intersection of curve with target lines)

Value

A ggplot object that can be further customized.

Examples

# See ?precision_profile for complete examples


valytics documentation built on Feb. 19, 2026, 5:06 p.m.