Equivalent to xpd = TRUE for ggvis
I am playing with ggvis and came up with the following code:
library(ggvis)
mtcars %>% ggvis(~disp, ~wt) %>%
layer_points() %>%
scale_numeric("x", domain = input_slider(50, 500, c(100, 400)), nice = FALSE) %>%
scale_numeric("y", domain = input_slider(0, 6, c(1, 5)), nice = FALSE)
This allows me to dynamically resize the plot. The problem is that when resizing some of the data points are displayed out of range. Is there an option, like the xpd=TRUE
base R plot, to copy the plot area so that data points outside the axis range are not displayed?
+3
mpiktas
source
to share
No one has answered this question yet
Check out similar questions:
8
6
3
3
1
1
1
0
0
0