Adding interactivity to a ggvis plot
One of the most attractive features of
ggvis is that it can be used to create an interactive web form. This allows the user to subset the data, or even change the visual properties of the plot, through interacting with the web form. In this recipe, we introduce how to add interactivity to a
Ensure you have installed and loaded
ggvis into your R session. Also, you need to complete the previous steps by storing
house in your R environment.
How to do it…
Please perform the following steps to add interactivity to
- First, make a bar plot with a drop-down menu and color options:
> house %>% + ggvis(~Status, ~Price, fill:= input_select(c("red","blue"), label="Fill Color")) %>% + layer_bars() ...