我尝试使用新的导游系统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())
但是传说看起来某种空泛的(不喜欢所有我见过的其他例子):
我在做什么错?
> 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对问题的描述非常清楚。 – Maiasaura 2012-03-01 22:37:12
不知道,但我会认为这可能发生在光栅和一些图形设备的组合。 'guide_colorbar(raster = FALSE)'会发生什么? – kohske 2012-03-01 23:33:09
使用光栅= FALSE删除这个洗涤,但然后传说有更多的灰色horiontal线(之间的蜱),并不看起来很漂亮。 – EDi 2012-03-01 23:57:29