gpt4 book ai didi

r - 虚幻的传奇ggplot2

转载 作者:行者123 更新时间:2023-12-04 20:18:26 26 4
gpt4 key购买 nike

我正在尝试在 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

最佳答案

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

Generated by ggplot 0.9.0

关于r - 虚幻的传奇ggplot2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9524929/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com