From nilsson.henric at gmail.com  Tue Sep 18 09:52:04 2007
From: nilsson.henric at gmail.com (Henric Nilsson (Private))
Date: Tue, 18 Sep 2007 09:52:04 +0200
Subject: [Rd] R-2.6.0 for Windows, semi-transparent colours and	layout()
In-Reply-To: <Pine.LNX.4.64.0709171534270.27414@gannet.stats.ox.ac.uk>
References: <46EBDF1A.5030501@gmail.com>
	<Pine.LNX.4.64.0709171534270.27414@gannet.stats.ox.ac.uk>
Message-ID: <20070918095204.53lxrk24cgscs008@www.sorch.se>

Prof Ripley,

Quoting Prof Brian Ripley <ripley at stats.ox.ac.uk>:

> On Sat, 15 Sep 2007, Henric Nilsson (Public) wrote:
>
>> Hi,
>>
>> The added support for semi-transparent colours in `windows' under
>> R-2.6.0 for Windows is much appreciated.
>>
>> However, I've discovered that issuing a `layout' (or `par' with
>> arguments `mfcol'/`mfrow') call and then trying to plot several figures
>> with semi-transparent colour on the same page results in only the first
>> one being fully drawn. E.g.
>
> That's not the whole story, as my test examples using multiple subplots
> did work.
>
> The problem I found is that clipping rectangles were being used in some
> places where I cannot find documentation that they should be.
> So explicitly setting the clipping rectangle before each alpha-blending
> call seems to fix the problematic examples, including yours.

Many thanks for looking into and fixing this -- I really appreciate it!


Henric



>>
>>> x <- rnorm(10000)
>>> y <- rnorm(10000)
>>>
>>> layout(matrix(1:2, ncol = 2))
>>> plot(y ~ x, pch = 16, col = rgb(1, 0, 0, 0.15))
>>> plot(y ~ x, pch = 16, col = rgb(1, 0, 0, 0.15))
>>
>> results in the second one having only the axes and box, but no data
>> points. This is under
>>
>>> sessionInfo()
>> R version 2.6.0 alpha (2007-09-14 r42843)
>> i386-pc-mingw32
>>
>> locale:
>> LC_COLLATE=Swedish_Sweden.1252;LC_CTYPE=Swedish_Sweden.1252;LC_MONETARY=Swedish_Sweden.1252;LC_NUMERIC=C;LC_TIME=Swedish_Sweden.1252
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>>
>> Henric
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>
> -- 
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] R-2.6.0 for Windows, semi-transparent colours and layout()
Henric Nilsson (Private