rstudio/ggvis

ggvis_0.4.2 layer_points size not scaling as expected

joshmorel opened this issue · 0 comments

Hello,
The documentation defines size as: pixel area of the symbol. For example in the case of circles, the radius is determined in part by the square root of the size value.

However, something does not seem to be working as expected, as if a quartic root is being taken instead. Here is the code:

I've attached a pic comparing the output of ggvis and something similar in the Vega Editor.
ggvis layer_point size issue

siz <- c(10,100,1000)
lab <- c("10","100","1000")
y <- rep(1,3)
size_df <- as.data.frame(siz,lab)

size_df %>% ggvis(x=~lab,y=~y,size=~siz) %>%
        layer_points() %>% scale_numeric("y", domain = c(.9,1.1))