2017-10-13 7 views
2

J'ai un problème avec la semi-transparence R (R version 3.3.2). -je obtenir cette erreur lorsque je tente:Semi-transparence dans le problème R-3.3.2 avec Cairo

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 

J'ai essayé 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?

Mais j'ai encore la même erreur, je modifié mon .Rprofile, redémarré mais maintenant.

Je ne sais pas quel type de sortie serait utile pour m'aider à résoudre ce problème.

Peut-être:

options('device') 
$device 
[1] "x11" 

Merci beaucoup si vous avez une idée, et laissez-moi savoir si je peux vous montrer d'autres sorties.

Edit 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 
+0

Quel système d'exploitation est-ce? Connexe: http://r.789695.n4.nabble.com/Error-in-svg-cairo-based-devices-are-not-supported-on-this-build-td3535907.html – tonytonov

+0

Merci pour votre réponse, Je travaille sur BioLinux/Ubuntu 14.04 LTS. – Corend

+0

Veuillez poster votre 'sessionInfo()'? L'entrée doc pour X11 stipule que "Only [Xlib] sera disponible si le système a été compilé sans support pour la cairographie". Alors peut-être que vous manquez des bibliothèques système? Qu'est-ce que 'capacités (" cairo ")'? Peut-être lié: https://stackoverflow.com/questions/13235100/empty-plot-in-r – tonytonov

Répondre

0

J'ai finalement trouvé un moyen de le faire fonctionner:

Je R désinstallé, réinstallé à l'aide ./configure --with-cairo.

Tout fonctionne maintenant et j'ai:

> capabilities("cairo") 
cairo 
TRUE