layer_points works fine…
library(ggvis)
library(dplyr)
##
## Attaching package: 'dplyr'
##
## The following object is masked from 'package:stats':
##
## filter
##
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
expand.grid(a = 1:10, b = 1:10) %>%
mutate(c = a*b) %>%
ggvis(~a, ~b, fill = ~c) %>%
layer_points()
…whereas layer_rects doesn’t:
expand.grid(a = 1:10, b = 1:10) %>%
mutate(c = a*b) %>%
ggvis(~a, ~b, fill = ~c) %>%
layer_rects(width = band(), height = band())
sessionInfo()
## R version 3.1.2 (2014-10-31)
## Platform: x86_64-apple-darwin13.4.0 (64-bit)
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] dplyr_0.4.0 ggvis_0.4.0.9000
##
## loaded via a namespace (and not attached):
## [1] assertthat_0.1 DBI_0.3.1 digest_0.6.8 evaluate_0.5.5
## [5] formatR_1.0 htmltools_0.2.6 httpuv_1.3.2 jsonlite_0.9.14
## [9] knitr_1.8 lazyeval_0.1.10 magrittr_1.5 mime_0.2
## [13] parallel_3.1.2 R6_2.0.1 Rcpp_0.11.3 RJSONIO_1.3-0
## [17] rmarkdown_0.4.2 shiny_0.10.2.2 stringr_0.6.2 tools_3.1.2
## [21] xtable_1.7-4 yaml_2.1.13