Semi-transparency in RStudio
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(salary~yrs.service+sex, data=Salaries) yrseff <- as.data.frame(allEffects(mod)[[1]]) ggplot(yrseff, aes(x=yrs.service, y=fit))+ geom_ribbon(aes(ymin=lower, ymax=upper), alpha=.2)+ geom_line(colour="darkgreen", size=2) I get this error message: Warning message: In grid.Call.graphics(L_polygon, x$x, x$y, index) : semi-transparency is not supported on this device: reported only once per page However, if I first open a pdf device (as in code