powered by
Generates a data frame containing variable names from cat_c_colors and corresponding x and y offsets based on the number of variables.
cat_c_colors
create_var_positions(cat_c_colors, num_vars)
A data frame with columns:
Factor of variable names from cat_c_colors.
Numeric x-axis offset for plotting.
Numeric y-axis offset for plotting.
A named vector of colors for variables in category C. The names correspond to variable names.
The number of variables. Supported values are "3", "4", "5", or "6".
library(dplyr) cat_c_colors <- c("Var1" = "red", "Var2" = "blue", "Var3" = "green") create_var_positions(cat_c_colors, 3)
Run the code above in your browser using DataLab