set_options: Set options for a ggvis plot

Description Usage Arguments See Also Examples

View source: R/options.R

Description

Set options for a ggvis plot

Usage

1
2
3
set_options(vis, width = NULL, height = NULL, keep_aspect = NULL,
  resizable = NULL, padding = NULL, duration = NULL, renderer = NULL,
  hover_duration = NULL)

Arguments

vis

Visualisation to modify

width,height

Width and height of plot, in pixels. Default is 600x400.

keep_aspect

Should the aspect ratio be preserved? The default value is FALSE, or the value of getOption("ggvis.keep_aspect"), if it is set.

resizable

If TRUE, allow the user to resize the plot. The default value is TRUE, or the value of getOption("ggvis.resizable"), if it is set.

padding

A padding object specifying padding on the top, right, left, and bottom. See padding.

duration

Duration of transitions, in milliseconds.

renderer

The renderer to use in the browser. Can be "canvas" or "svg" (the default).

hover_duration

The amount of time for hover transitions, in milliseconds.

See Also

link{getOption} and link{options}, for getting and setting global options.

link{default_opts} to see the default options.

Examples

1
2
3
4
5
6
7
mtcars %>%
  ggvis(~wt, ~mpg) %>%
  layer_points() %>%
  set_options(width = 300, height = 200, padding = padding(10, 10, 10, 10))

# Display the default options
str(default_options())

rpruim/ggvis2 documentation built on May 28, 2019, 2:34 a.m.