[R-SIG-Mac] 2 questions: quartz(width) and another about image

Ken Knoblauch knoblauch at lyon.inserm.fr
Fri Mar 4 09:50:59 CET 2005


I have two questions:
1) I'm using image() to recreate a set of checkerboard stimuli used by a
colleague in a color vision experiment (not to do the experiment
but to show the stimulus in a talk in which I refer to his work).
Here is the code for one of them:

chkb8 <- matrix(rep(c(rep(c(1,2), 4), rep(c(2,1), 4)), 4), ncol = 8)
chkb16 <- kronecker(chkb8, matrix(1, ncol=2, nrow=2))
chkb16[6:11, 6:11] <- 1
chkb16[8:9,8:9] <- 3
image(chkb16, axes=FALSE,col=c("red","green","yellow"))

This works but if I display it in a quartz device, there are fine horizontal
and vertical lines in the image, which are not there if I use x11().
Interestingly, when I save the image with the pdf() device, I
get the lines if I open the pdf file with TeXShop but not Acrobat Reader.
If I import the image to Keynote, I get the lines from the TeXShop
export but not Acrobat.  The solution is evidently to use the Acrobat
export but why do these lines appear in the rendition with the quartz
device? and is there an easy fix to eliminate them?

2)  I've noticed for awhile that the width and height commands do not work
(for me) for the quartz device for the daily versions of the Cocoa gui, though
they do on the version that comes with the R 2.0.1 binary installation.

I would be grateful for any enlightenment.  Thank you.

platform powerpc-apple-darwin6.8
arch     powerpc                
os       darwin6.8              
system   powerpc, darwin6.8     
major    2                      
minor    0.1                    
year     2004                   
month    11                     
day      15                     
language R   



Ken Knoblauch
Inserm U 371
Cerveau et Vision
18 avenue du Doyen Lepine
69675 Bron cedex
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: 06 84 10 64 10

More information about the R-SIG-Mac mailing list