ggvis icon indicating copy to clipboard operation
ggvis copied to clipboard

Unexpected behavior with height parameter in layers_rect with numeric scale

Open jrdnmdhl opened this issue 9 years ago • 0 comments

Line below seems like it ought to create a rectangle with width of 10 and height of 10. Instead, it creates a rectangle with a width of greater than 10 and height of 1, at least for what is in the viewable area. ggvis(data=data.frame(x=0,y=0,h=10,w=10),~x,~y,height=~h,width=~w) %>% layer_rects()

I have also seen some cases where the rectangles will overflow the plot area.

A workaround is to supply x2/y2 instead of width/height, but this results in different animation behavior when the sign of the height changes. plot_975901063

jrdnmdhl avatar Jan 09 '16 19:01 jrdnmdhl