Skip to content
Back to formatted view

Raw Message

Message-ID: <B5D33109-7452-4115-B779-6A74ED3374BD@pobox.com>
Date: 2006-12-05T02:20:09Z
From: Saptarshi Guha
Subject: A question on grid - grid.points not spaced properly

Hello,
	How can i 'fix' the following output.

	v=viewport(x=216/2, y=216/2,w=216, h=216,default.units = "bigpts")
	pushViewport(v)
	x=c(119,130,140,151)
	y=c(124,124,124,124)
	grid.points(x,y,size=unit(1,"bigpts"),default.units="bigpts",pch=".")
	grid.points(x-2,y,size=unit(1,"bigpts"),default.units="bigpts",pch=".")
	grid.points(x+2,y,size=unit(1,"bigpts"),default.units="bigpts",pch=".")
	grid.points(x,y-2,size=unit(1,"bigpts"),default.units="bigpts",pch=".")
	grid.points(x,y+2,size=unit(1,"bigpts"),default.units="bigpts",pch=".")


	One would expect to get a 4 figures composed of 5 dots each  - 2  
vertically spaced and 2 horizontally spaced symmetrically around the  
center dot.
	However i seem to get odd results - e.g on Quartz(OS X) output, the  
last command, places the dot bang next to the center dot.
	On 'jpeg' output with higest quality, this oddity happens with the 'x 
+2' command.

	This doesn't happen to all of the points, only some - and not necc.  
the edge figures.

	Is there anyway i can control this?
	Thanks
	Saptarshi

Saptarshi Guha | sapsi at pobox.com | http://www.stat.purdue.edu/~sguha