Re: [Rd] R-2.6.0 for Windows, semi-transparent colours and layout()

From: Henric Nilsson (Private) <nilsson.henric_at_gmail.com>
Date: Tue, 18 Sep 2007 09:52:04 +0200

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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 19 Sep 2007 - 20:40:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 20 Sep 2007 - 00:41:44 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.