我是 ggvis 的新手,有一个相当简单的问题。我想在散点图中显示数据点及其标签。各个图很容易生成:
# Render as Points ...
mtcars %>% ggvis(~wt, ~mpg) %>% layer_points()
# or as labels of `wt`
mtcars %>% ggvis(~wt, ~mpg, text:=~wt) %>% layer_text()
但是两者的结合是行不通的。
mtcars %>% ggvis(~wt, ~mpg, text:=~wt) %>% layer_text() %>% layer_points()
我收到此错误:
Error: Unknown properties: text.
Did you mean: stroke?
关于图层的文档在这里没有帮助(http://ggvis.rstudio.com/ggvis-basics.html#multiple-layers,http://ggvis.rstudio.com/layers.html)。