华丽的传说ggplot2

时间:2012-03-01 22:07:03

标签: r ggplot2

我正在尝试在ggplot2中使用新的指南系统:

require(devtools)    
dev_mode()   
install_github("ggplot2")
require(ggplot2)

require(reshape2)
p <- ggplot(melt(outer(1:4, 1:4)), aes(x=Var1, y=Var2)) + geom_tile(aes(fill=value))
p + guides(fill = guide_colorbar())

然而,传说看起来有点像什么(不像我见过的所有其他例子): enter image description here

我做错了什么?

> sessionInfo()
R version 2.14.1 (2011-12-22)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=C                 LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] reshape2_1.2.1  ggplot2_0.9.0   devtools_0.6    gridSVG_0.8-1   proto_0.3-9.2   rgeos_0.2-3     stringr_0.6     gpclib_1.5-1   
 [9] maptools_0.8-14 lattice_0.20-0  sp_0.9-95       foreign_0.8-49 

loaded via a namespace (and not attached):
 [1] colorspace_1.1-1   dichromat_1.2-4    digest_0.5.1       MASS_7.3-17        memoise_0.1        munsell_0.3       
 [7] plyr_1.7.1         RColorBrewer_1.0-5 RCurl_1.91-1       scales_0.2.0       tools_2.14.1

1 个答案:

答案 0 :(得分:4)

使用稳定的CRAN版ggplot2_0.9.0reshape2_1.2.1看起来不错 也许您可以报告错误here

Generated by ggplot 0.9.0