| dodge_positions | R Documentation |
Adjusts x-coordinates (and optionally xmin/xmax) to dodge overlapping points or ranges in grouped plots.
dodge_positions(
datapoints,
dodge,
fixed.dodge = TRUE,
cols = NULL,
settings = NULL
)
datapoints |
Data frame containing plot data with at least |
dodge |
Adjustment parameter for dodging overlapping points or ranges in grouped plots along the x-axis (or y-axis for flipped plots). Either:
Default value is 0 (no dodging). While we do not check, it is strongly recommended that dodging only be used in cases where the x-axis comprises a limited number of discrete breaks. |
fixed.dodge |
Logical. If |
cols |
Character vector of column names to dodge. If |
settings |
Environment containing plot settings. If |
When fixed.dodge = TRUE, all groups are dodged by the same amount across all
x values, which is useful when x is categorical. When fixed.dodge = FALSE,
dodging is calculated independently for each x value, which is useful when
the number of groups varies across x values.
If cols is not specified, the function automatically dodges x and any
xmin/xmax columns that exist in the data.
Modified datapoints data frame with dodged positions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.