[R] grid and gtkDevice package clipping bug.

M.Kondrin mkondrin at hppi.troitsk.ru
Tue Jul 22 05:21:37 CEST 2003


Duncan Temple Lang wrote:
> Hi there.
> 
>   What commands did you use to get this effect?  I can't seem
> to reproduce it on my machine with some simple commands to get
> the same display.
> 
>  Thanks,
>    D
> 
> M.Kondrin wrote:
> 
>>Hello!
>>When I draw points on grid's viewport with clip set to TRUE clipping 
>>does not have effect on some symbols. It happens only when drawing over 
>>gtkDevice (GTK ver. 1.2) (with postscript device clipping works OK - 
>>take a look at this screenshot 
>>http://www.hppi.troitsk.ru/Kondrin/clipbug.png) and only with symbols 
>>that are drawn with commands other than gdk_draw_polygon() (i.e. circles 
>>- gdk_draw_arc() - and squares - gdk_draw_rect()).
>>
>>______________________________________________
>>R-help at stat.math.ethz.ch mailing list
>>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 
>
I test this only with symbols with pch>20.
Here is an example
> gtk()
> viewport(h=0.8,w=0.8,clip=F)->v2
> grid.rect(vp=v2)->r
> v2$clip
[1] FALSE
> v2$clip<-T
> v2$clip
[1] TRUE
> grid.points(c(-0.1,0.5,1.1),c(-0.1,0.5,1.1),pch=21,vp=v2)
>
#clipping does not work - there are circles outside rectangle
> grid.points(c(-0.1,0.5,1.1),c(0,0.5,1),pch=24,vp=v2)
#now OK - have only one triangle in the center of rectangle




More information about the R-help mailing list