我有一个与R半透明度相关的问题(R版本3.3.2)。
当我尝试执行以下操作时,会出现此错误:
我尝试了 http://tinyheero.github.io/2015/09/15/semi-transparency-r.html , 如何将cairo设置为R中x11()的默认后端? 在RStudio中实现半透明 如何在ggplot2中保留透明度? 但我仍然遇到相同的错误,我修改了
我不知道什么样的输出对于帮助我解决问题有用。
也许:
感谢您提供的任何线索,如果您想查看其他输出,请告诉我。
编辑1:
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 , 如何将cairo设置为R中x11()的默认后端? 在RStudio中实现半透明 如何在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
sessionInfo()
?X11 的文档条目指出:“如果系统在没有支持 cairographics 的情况下编译,则只有 [Xlib] 可用。” 所以也许您缺少系统库?capabilities("cairo")
是什么?可能相关:https://dev59.com/3mrWa4cB1Zd3GeqP_Xh9 - tonytonov