create_var_positions | R Documentation |
Generates a data frame containing variable names from cat_c_colors
and corresponding x and y offsets based on the number of variables.
create_var_positions(cat_c_colors, num_vars)
cat_c_colors |
A named vector of colors for variables in category C. The names correspond to variable names. |
num_vars |
The number of variables. Supported values are "3", "4", "5", or "6". |
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.
library(dplyr)
cat_c_colors <- c("Var1" = "red", "Var2" = "blue", "Var3" = "green")
create_var_positions(cat_c_colors, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.