对于小于1e-10的数字,我有一个y缩放的问题:它们全都出现在同一条水平线上。小数字的Y轴缩放问题
这里是一个重复的例子:
file <- structure(list(I = c(-7.254574e-11, -5.649333e-11, -5.015416e-11,
-4.228137e-11, -3.287486e-11, -2.714915e-11, -2.203692e-11, -1.784489e-11,
-1.150574e-11, -1.058553e-11, -6.189018e-12, -3.735149e-12, -2.303724e-12,
6.610914e-13, 1.274374e-12, -3.610768e-13, 5.465134e-12, 6.691699e-12,
8.020478e-12, 1.139353e-11, 1.537988e-11, 1.926399e-11, 2.130825e-11,
2.45791e-11, 3.204071e-11, 3.582262e-11, 4.287535e-11, 4.624839e-11,
5.16657e-11, 6.035387e-11), V = c(-2, -1.867, -1.733, -1.6, -1.467,
-1.333, -1.2, -1.067, -0.933, -0.8, -0.667, -0.533, -0.4, -0.267,
-0.133, 0, 0.133, 0.267, 0.4, 0.533, 0.667, 0.8, 0.933, 1.067,
1.2, 1.333, 1.467, 1.6, 1.733, 1.867)), .Names = c("I", "V"), class = "data.frame", row.names = c(NA,
-30L))
plot(file$V,file$I)
gg <- ggplot(file,aes(x = V,y=I))
print(gg + geom_point())
正如你所看到的,使用基本绘图功能点被同时使用GGPLOT2它们显示在一个水平线上正确显示。
2011年5月,我在邮件列表上看到了一个类似的帖子,哈德利回答说它与ggplot2的开发版一起工作。但是,使用下面描述的R版本,我仍然得到错误。
> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: i686-pc-linux-gnu (32-bit)
locale:
[1] LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C LC_TIME=fr_FR.UTF-8
[4] LC_COLLATE=fr_FR.UTF-8 LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] tikzDevice_0.6.2 filehash_2.2-1 scales_0.2.0 plyr_1.7.1 reshape2_1.2.1
[6] ggplot2_0.9.0
loaded via a namespace (and not attached):
[1] colorspace_1.1-1 dichromat_1.2-4 digest_0.5.2 grid_2.15.0 MASS_7.3-18
[6] memoise_0.1 munsell_0.3 proto_0.3-9.2 RColorBrewer_1.0-5 stringr_0.6
[11] tools_2.15.0
任何人都有线索?
预先感谢您! Thibaud Ruelle
+1快速测试证实了我的系统上的这种行为(ggplot2 0.9.1)。也许有一个逆转,或? –
@BenBolker考虑到前面的问题与[this](http://stackoverflow.com/q/10808056/324364)的连接,我在Brian的聊天记录中询问了这件事。 – joran
@joran是的,似乎这两个职位可以合并。对不起,我的研究没有发现它。 –