powered by
Prepare ggplot object to ggplotly-compatible layer and image layer
ggplotly_background( g, repel_color = TRUE, repel_label = TRUE, encircle = FALSE, mascarade = FALSE, width = 5, height = 5, filename = "temp.png", draw_box = NULL, background = NULL, background_alpha = 1, use_cairo = FALSE, label_lim = 0.05, ggbuild = NULL, crop = TRUE, size_nudge = 0, tooltip = NULL, ... )
plotly object with background image of layers unsupported by plotly
ggplot plot object
whether to rearrange colors
whether to add centroid labels with ggrepel
whether to draw geom_encircle by cluster
use mascarade package to outline clusters
plot width
plot height
temp file location for saving image
if a colored background should be included
if specified, use this ggplot object or file as background instead
alpha value of background image
whether to use cairo for saving plots, maybe needed for certain ggplot extensions
whether to limit labels to avoid edge fraction
already built ggplot_built object if available
whether to call cropping of the background image to remove whitespace
slight image size adjustment, default to none
tooltip vector for ggplotly
arguments passed to gg_color_repel
a <- ggplot2::ggplot(ggplot2::mpg, ggplot2::aes(displ, hwy)) + ggplot2::geom_point(ggplot2::aes(color = as.factor(cyl))) new_colors <- color_repel(a)
Run the code above in your browser using DataLab