File: size.r

package info (click to toggle)
r-cran-ggvis 0.4.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,716 kB
  • sloc: sh: 25; makefile: 2
file content (11 lines) | stat: -rw-r--r-- 354 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
library(ggvis)

# Set size to 300x300 pixels
mtcars %>% ggvis(x = ~wt, y = ~mpg) %>%
  layer_points() %>%
  set_options(width = 300, height = 300)

# Set size to 300x300 pixels, and add 50 pixels padding on all sides
mtcars %>% ggvis(x = ~wt, y = ~mpg) %>%
  layer_points() %>%
  set_options(width = 300, height = 300, padding = padding(50, 50, 50, 50))