From murdoch at stats.uwo.ca  Thu May 22 00:36:24 2008
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Wed, 21 May 2008 18:36:24 -0400
Subject: [Rd] image (PR#11493)
In-Reply-To: <A59581A2-FC4F-4A01-A384-4B79970B26A4@r-project.org>
References: <20080521000503.67F60282EFF6@mail.pubhealth.ku.dk>
	<A59581A2-FC4F-4A01-A384-4B79970B26A4@r-project.org>
Message-ID: <4834A3E8.9050307@stats.uwo.ca>

(Edited to add link to sample picture)

Simon Urbanek wrote:
> On May 20, 2008, at 8:05 PM, jms2003 at med.cornell.edu wrote:
>
>   
>> Full_Name: Joseph Scandura
>> Version: 2.7.0
>> OS: Mac 10.5
>> Submission from: (NULL) (140.251.50.94)
>>
>>
>> Since updating to 2.7.0 all plots that use image() (heatmap, etc...)  
>> now draw
>> visible boxes around each rectangle in the plot. When there are many  
>> rectangles
>> the surrounding color becomes dominant over the rectangle color and  
>> the overall
>> image is borderline useless.
>>
>>     
>
> Can you, please, specify exactly which graphics device you are using  
> and possibly a snapshot of the problem? I don't see any additional  
> boxes being drawn on any device.
>   

I see lines at the borders of the grid used by image on my Mac (Tiger, R
2.7.0 Patched (2008-05-20 r45743)).
They are most visible in the last of the examples plotted by
example(image), the one that starts
image(x, y, volcano, col = terrain.colors(100), axes = FALSE).  It opens
a Quartz device.

How do you do a snapshot on a Mac?  I see online that it's Cmd-Shift-4,
and I get the snapshot click, but I don't know where the picture ended up.

AHA!  It goes to the desktop.

Okay, a sample picture is available at

http://www.stats.uwo.ca/faculty/murdoch/temp/grid.png

Not as bad as Joseph was describing, but not nearly as good as Windows 
produces ;-).


> The only issue I'm aware of are anti-aliasing effects around the edges  
> of adjacent rectangles which don't fall on the pixel boundary (if anti- 
> aliasing device is used). Depending on the subpixel location of the  
> edge, the background color may shine through very slightly. It's not  
> what you describe, but it's closest to what I can imagine you could  
> mean. However, AFAICS this has not been changed recently and is a  
> rendering artifact which is hard to get rid of in the current setup as  
> devices are resolution-independent (the only cure I'm aware of [short  
> of disabling anti-aliasing]  is to distort the original plot such that  
> rectangles are aligned with the pixels of the output medium).
>   
I don't know if what I'm seeing is new or not; I've only got one R
version installed.

Duncan Murdoch
> Cheers,
> Simon
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



[Rd] image (PR#11493)
Duncan Murdoch