This function extends ggiraph::girafe by allowing colour palettes to be globally specified.
girafe(
ggobj,
...,
char_limit = 200,
label_wrap_width = 80,
interactive = TRUE,
palette_codes = NULL,
priority_palette_codes = NULL,
ncol = NULL,
byrow = TRUE,
colour_2nd_binary_cat = NULL,
checked = NULL,
not_checked = NULL,
width_svg = NULL,
height_svg = NULL,
pointsize = 12
)If interactive, only side-effect of generating ggiraph-plot. If interactive=FALSE, returns modified ggobj.
ggplot2-object.
Dots forwarded to ggiraph::girafe()
Integer. Number of characters to fit on a line of plot (legend-space). Will be replaced in the future with a function that guesses this.
Integer. Number of characters fit on the axis text space before wrapping.
Boolean. Whether to produce a ggiraph-plot with interactivity (defaults to TRUE) or a static ggplot2-plot.
Optional list of named character vectors with names being categories and values being colours. The final character vector of the list is taken as a final resort. Defaults to NULL.
Optional named character of categories (as names) with corresponding colours (as values) which are used first, whereupon the remaining unspecified categories are pulled from the last vector of palette_codes. Defaults to NULL.
Optional integer or NULL.
Whether to display legend keys by row or by column.
Optional string. Color for the second category in binary checkbox plots. When set together with checked and not_checked, reverses the category order so that not_checked appears second and receives this color. Ignored if checkbox criteria are not met.
Optional string. If specified and the fill categories of the plot matches these, a special plot is returned where not_checked is hidden. Its usefulness comes in plots which are intended for checkbox responses where unchecked is not always a conscious choice.
See ggiraph::girafe().
plot <- makeme(data = ex_survey, dep = b_1)
girafe(plot)
Run the code above in your browser using DataLab