layer_guess | R Documentation |
layer_guess
provides the magic behind the default behaviour of
ggvis
.
layer_guess(vis, ...)
vis |
The visualisation to add the new layer to. |
... |
Other arguments passed on individual layers. |
Continuous x, layer_histograms
Categorical x, layer_bars
Continuous x and y, layer_points
# A scatterplot:
mtcars %>% ggvis(~mpg, ~wt)
mtcars %>% ggvis(~mpg, ~wt) %>% layer_guess()
# A histogram:
mtcars %>% ggvis(~mpg)
mtcars %>% ggvis(~mpg) %>% layer_guess()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.