Learn R Programming

ggiraph (version 0.6.1)

opts_toolbar: toolbar settings

Description

Allows customization of the toolbar

Usage

opts_toolbar(position = "topright", saveaspng = TRUE)

Arguments

position

one of 'top', 'bottom', 'topleft', 'topright', 'bottomleft', 'bottomright'

saveaspng

set to TRUE to propose the 'save as png' button.

See Also

set options with girafe_options

Other girafe animation options: opts_hover, opts_selection, opts_tooltip, opts_zoom

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_toolbar(position = "top") )
if( interactive() ) print(x)
# }

Run the code above in your browser using DataLab