开罗的 R-3.3.2 问题中的半透明
Semi-transparency in R-3.3.2 issue with Cairo
我对 R 半透明(R 版本 3.3.2)有疑问。
我在尝试时遇到此错误:
ggplot(iris, aes(x = factor(Species), y = Sepal.Length, fill = Species)) +
+ geom_boxplot(alpha = 0.4)
Warning messages:
1: In grDevices::x11(..., type = "cairo") :
cairo-based types are not supported on this build - using "Xlib"
2: In grid.Call.graphics(L_polygon, x$x, x$y, index) :
semi-transparency is not supported on this device: reported only once per page
我试过了http://tinyheero.github.io/2015/09/15/semi-transparency-r.html,
How to set cairo as default backend for x11() in R?
Semi-transparency in RStudio
How do I preserve transparency in ggplot2?
但是我还是有同样的错误,我修改了我的.Rprofile
,重新启动了但是还是不行。
我不知道什么样的输出可以帮助我解决这个问题。
也许:
options('device')
$device
[1] "x11"
如果您有任何线索,非常感谢您,如果我可以向您展示其他输出,请告诉我。
编辑 1:
>sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS
locale:
[1] LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8
[5] LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C 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] Cairo_1.5-9
>capabilities("cairo")
cairo
FALSE
我终于找到了让它工作的方法:
我卸载了 R
,使用 ./configure --with-cairo
重新安装了它。
现在一切正常,我有:
> capabilities("cairo")
cairo
TRUE
我对 R 半透明(R 版本 3.3.2)有疑问。 我在尝试时遇到此错误:
ggplot(iris, aes(x = factor(Species), y = Sepal.Length, fill = Species)) +
+ geom_boxplot(alpha = 0.4)
Warning messages:
1: In grDevices::x11(..., type = "cairo") :
cairo-based types are not supported on this build - using "Xlib"
2: In grid.Call.graphics(L_polygon, x$x, x$y, index) :
semi-transparency is not supported on this device: reported only once per page
我试过了http://tinyheero.github.io/2015/09/15/semi-transparency-r.html,
How to set cairo as default backend for x11() in R?
Semi-transparency in RStudio
How do I preserve transparency in ggplot2?
但是我还是有同样的错误,我修改了我的.Rprofile
,重新启动了但是还是不行。
我不知道什么样的输出可以帮助我解决这个问题。
也许:
options('device')
$device
[1] "x11"
如果您有任何线索,非常感谢您,如果我可以向您展示其他输出,请告诉我。
编辑 1:
>sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS
locale:
[1] LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8
[5] LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C 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] Cairo_1.5-9
>capabilities("cairo")
cairo
FALSE
我终于找到了让它工作的方法:
我卸载了 R
,使用 ./configure --with-cairo
重新安装了它。
现在一切正常,我有:
> capabilities("cairo")
cairo
TRUE