Semi-transparency in RStudio

前端 未结 4 1034
不知归路
不知归路 2021-02-14 03:38

I\'m trying to create a plot with a semi-transparent confidence region around the regression line:

library(car)
library(ggplot2)
library(effects)

mod <- lm(s         


        
相关标签:
4条回答
  • 2021-02-14 04:20

    I have faced similar problems while running packages 'dismo' and 'ggplot2' in RStudio. As this problem started after I installed 'Ghostscript' into my Window_64, I removed all these folders from my computer in order to check if its works normally. RStudio worked normally without any error after removing 'Ghostscript'. However, by using options(bitmapType="cairo") as per above postings, I could resolve the error, but I had to rerun for every time for normal functioning of RStudio.

    0 讨论(0)
  • 2021-02-14 04:33

    I had the same problem under Ubuntu 16.04 when using RStudio with R v4.4.0. After updating R to v4.4.4 and running RStudio from terminal it was working fine.

    Be aware that R version RStudio uses depends on the way you are starting the application (from desktop or terminal).

    0 讨论(0)
  • 2021-02-14 04:34

    per request of the OP:

    Can you paste the output of getOption("bitmapType") in your config? If it's not "cairo" try setting it to that via options(bitmapType="cairo") and see if you get the same error.

    0 讨论(0)
  • 2021-02-14 04:34

    I had exactly the same problem as the OP, but in my case setting options(bitmapType="cairo") did not solve the problem.

    In my case the problem was caused by the fact that I compiled R manually from source without the --with-cairo configure option (or rather: my system was lacking the necessary libcairo2-dev package, the --with-cairo did not have any effect). Recompiling R with proper cairo support fixed the issue. It now even works although getOption("bitmapType") is still set to `"Xlib".

    0 讨论(0)
提交回复
热议问题