If you’re familiar with ggplot2, learning ggvis shouldn’t be too hard - it borrows from many familiar concepts. Note that ggvis is still very young, and many of the interfaces are likely to change as we learn more about what works well.
Basic naming conversions: layer -> node, geom -> mark, stat -> transform, aes -> props, ggplot2 -> ggvis, geom + stat -> layer.
Facetting is not currently supported, and when it is supported, it’s more like to resemble embedded plots than facetting in ggplot2.
In ggplot2, the definition of a geom was somewhat blurred, because of things like geom_histogram()
which combined geom_bar()
with stat_bin()
. The distinction is more clear in ggvis: pure geoms correspond to marks, and combined geoms and stats correspond to layers.
The ggvis function qvis
is analogous to ggplot2’s qplot
.
Vega provides a smaller set of scales than ggplot2 (just ordinal, quantitative, and time), but they are much more flexible than ggplot2 scales, and offer equivalent functionality.
ggplot2 has a two-level hierarchy - you have data and aes specifications in the plot and in each layer. ggvis provides an unlimited hierarchy - you can have as many levels as you need (and the data will only be computed once)
ggvis makes fewer assumptions about the type of data - data does not have to be a data frame until it has been processed by a transform.