Jiaxuan Chen
2018-Apr-16 17:41 UTC
[Rd] alpha transparency doesn't work for lines when xpd=TRUE
Dear R-devel, I think I've found a bug - the alpha transparency doesn't work when plotting lines with xpd = TRUE. #works plot(1:20, col="#1874CD", xpd=T, type="l") #works plot(1:20, col="#1874CD50", xpd=F, type="l") #doesn't work plot(1:20, col="#1874CD50", xpd=T, type="l") Thank you. Jim [[alternative HTML version deleted]]
David Winsemius
2018-Apr-16 19:14 UTC
[Rd] alpha transparency doesn't work for lines when xpd=TRUE
> On Apr 16, 2018, at 10:41 AM, Jiaxuan Chen <Jiaxuan.Chen at cruk.cam.ac.uk> wrote: > > Dear R-devel, > > I think I've found a bug - the alpha transparency doesn't work when plotting lines with xpd = TRUE. > > #works > plot(1:20, col="#1874CD", xpd=T, type="l") > > #works > plot(1:20, col="#1874CD50", xpd=F, type="l") > > #doesn't work > plot(1:20, col="#1874CD50", xpd=T, type="l")It's behaving as expected (last two lines light blue) on a Mac (El Capitan) and R 3.4.3. (I did check to see if T and F were still TRUE and FALSE at the time. It's possible that they were not in your session. Only TRUE and FALSE are reserved words.)> > Thank you. > > Jim > > > [[alternative HTML version deleted]]All the R mailing lists are plain text.> > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-develDavid Winsemius Alameda, CA, USA 'Any technology distinguishable from magic is insufficiently advanced.' -Gehm's Corollary to Clarke's Third Law
William Dunlap
2018-Apr-16 19:59 UTC
[Rd] alpha transparency doesn't work for lines when xpd=TRUE
The problem occurs in the Windows GUI with the 'windows()' graphics device. In the following example the red diagonal line appears in 3 plots but not in the one with xpd=TRUE and alpha.f=0.9.> par(mfrow=c(2,2)) > for(xpd in c(FALSE, TRUE)) for(alpha.f in c(.9, 1))plot(0:1,xpd=xpd,type="l",col=adjustcolor("red",alpha.f=alpha.f),main=paste0("xpd=",xpd,", alpha.f=",alpha.f))> dev.cur()windows 2> sessionInfo()R version 3.4.4 (2018-03-15) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 16299) Matrix products: default locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.4.4 Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, Apr 16, 2018 at 12:14 PM, David Winsemius <dwinsemius at comcast.net> wrote:> > > On Apr 16, 2018, at 10:41 AM, Jiaxuan Chen <Jiaxuan.Chen at cruk.cam.ac.uk> > wrote: > > > > Dear R-devel, > > > > I think I've found a bug - the alpha transparency doesn't work when > plotting lines with xpd = TRUE. > > > > #works > > plot(1:20, col="#1874CD", xpd=T, type="l") > > > > #works > > plot(1:20, col="#1874CD50", xpd=F, type="l") > > > > #doesn't work > > plot(1:20, col="#1874CD50", xpd=T, type="l") > > It's behaving as expected (last two lines light blue) on a Mac (El > Capitan) and R 3.4.3. (I did check to see if T and F were still TRUE and > FALSE at the time. It's possible that they were not in your session. Only > TRUE and FALSE are reserved words.) > > > > Thank you. > > > > Jim > > > > > > [[alternative HTML version deleted]] > > All the R mailing lists are plain text. > > > > > ______________________________________________ > > R-devel at r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > David Winsemius > Alameda, CA, USA > > 'Any technology distinguishable from magic is insufficiently advanced.' > -Gehm's Corollary to Clarke's Third Law > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >[[alternative HTML version deleted]]