[Rd] postscript image problem (PR#6763)

jonathan_lees at unc.edu jonathan_lees at unc.edu
Tue Apr 13 23:39:25 CEST 2004


Full_Name: Jonathan Lees
Version: 1.8.1
OS: GNU/Linux   2.4.20-20.8smp #1 SMP
Submission from: (NULL) (152.2.75.114)


I am having trouble with the postscript output of images.
They have lines on them that are not supposed to be there.
I have noticed this on numerous trials of printing various images.
I looked at the postscript and I see that it
appears to plot each individual block - so perhaps occasionally the 
space between the blocks "leaks" through do to round off,
thus contaminating the image.
this could be solved if the image software used postscript
image plotting functions.

Here is an example of some code:

postscript(file ="test.ps" , onefile=FALSE, print.it=FALSE)


w<-5 #width of central square
m=w
xn<- 128; yn<- 128
im<- matrix(0,nrow=yn,ncol=xn)
xc<-floor(xn/2)+1;
yc<- floor(yn/2)+1 # centers of the image
im[(-m:m)+xc,(-m:m)+yc]<- 1

image(im , col = cmap ); title('im=Original image')


dev.off()

view this output with any postscript viewer (or printer)
and you will see extra lines on the plot.

Does this bother anyone else?

Joanthan Lees



More information about the R-devel mailing list