scale_y_pareto: Pareto y-scale with cumulative percentage axis

View source: R/geoms.R

scale_y_paretoR Documentation

Pareto y-scale with cumulative percentage axis

Description

scale_y_pareto() configures a primary y-axis for absolute values and a secondary right-side axis that maps cumulative totals to percentages.

Usage

scale_y_pareto(
  sum_abs = NULL,
  name = ggplot2::waiver(),
  percent_name = "Cumulative (%)",
  ...
)

Arguments

sum_abs

Total absolute value used for percentage conversion, typically sum(abs(y)) from the source data. When NULL (default), the secondary axis is scaled to the current primary-axis maximum.

name

Primary y-axis label.

percent_name

Secondary y-axis label.

...

Additional arguments passed to ggplot2::scale_y_continuous().

Details

Use this with geom_pareto_line(cumulative = "raw") so the cumulative line ends at 100% on the secondary axis.


adas.utils documentation built on Feb. 27, 2026, 5:08 p.m.