From wdunlap at tibco.com  Mon Apr 16 21:59:02 2018
From: wdunlap at tibco.com (William Dunlap)
Date: Mon, 16 Apr 2018 12:59:02 -0700
Subject: [Rd] alpha transparency doesn't work for lines when xpd=TRUE
In-Reply-To: <64DA81B1-69D2-4457-95FA-7FFFF24F01A3@comcast.net>
References: <BBFFC8D403F0364E9A4176D542D830E912BF842A@SRV12-0032.cri.camres.org>
 <64DA81B1-69D2-4457-95FA-7FFFF24F01A3@comcast.net>
Message-ID: <CAF8bMcb37CVQsqzONBQxRBXh2uMVDOO_zTMaKHjBPHz8pfG-jg@mail.gmail.com>

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]]



[Rd] alpha transparency doesn't work for lines when xpd=TRUE
William Dunlap