Learn R Programming

ggiraph (version 0.6.1)

opts_sizing: girafe sizing settings

Description

Allows customization of the svg style sizing

Usage

opts_sizing(rescale = TRUE, width = 1)

Arguments

rescale

if FALSE, graphic will not be resized and the dimensions are exactly those of the container.

width

widget width ratio (0 < width <= 1).

See Also

set options with girafe_options

Examples

Run this code
# NOT RUN {
library(ggplot2)

dataset <- mtcars
dataset$carname = row.names(mtcars)

gg <- ggplot(
  data = dataset,
  mapping = aes(x = wt, y = qsec, color = disp,
                tooltip = carname, data_id = carname) ) +
  geom_point_interactive() + theme_minimal()

x <- girafe(ggobj = gg)
x <- girafe_options(x,
  opts_sizing(rescale = FALSE) )
if( interactive() ) print(x)
# }

Run the code above in your browser using DataLab