create_custom_domino_legends_categorical | R Documentation |
Create custom legends for the domino plot
create_custom_domino_legends_categorical(
contrast_levels,
var_positions,
var_id,
contrast,
categorical_colors,
color_scale_name,
legend_text_size = 8,
left_rect_color = "lightblue",
right_rect_color = "lightpink"
)
contrast_levels |
A character vector of contrast level names. |
var_positions |
A data frame containing variable positions. |
var_id |
A string representing the column name for the variable identifier. |
contrast |
A string representing the column name for the contrast variable. |
categorical_colors |
A named vector specifying the colors for each category. |
color_scale_name |
A string specifying the name of the color scale in the legend. |
legend_text_size |
A numeric value indicating the text size for the legend. |
left_rect_color |
A string specifying the color for the left rectangles. |
right_rect_color |
A string specifying the color for the right rectangles. |
A ggplot object containing custom legends.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.