bokeh / rbokeh

R interface to Bokeh http://hafen.github.io/rbokeh/
Other
313 stars 66 forks source link

glyph "magically" set to "Image" when both glyph and color are set (in dev) #179

Closed lianos closed 8 years ago

lianos commented 8 years ago

I've been trying to dig myself out from under this one for a while but I'm hoping @hafen can spot this out immediately.

I'm working with the dev version, and specifying both color and glyph is throwing an error. I know it's a WIP but I figured feedback early in the process could be helpful

library(rbokeh)
ir <- transform(iris, group = sample(c("a", "b"), nrow(iris), replace=TRUE))

## works
figure(ir) %>% ly_points(Sepal.Length, Sepal.Width, color=Species)

## works
figure(ir) %>% ly_points(Sepal.Length, Sepal.Width, glyph=group)

## breaks
figure(ir) %>% ly_points(Sepal.Length, Sepal.Width, glyph=group, color=Species)
## Error in if (glyph == "Image") { : argument is of length zero
hafen commented 8 years ago

Thanks for this case. I'll look into it right away.

hafen commented 8 years ago

I've fixed it in the dev branch. Feel free to give it a try and make sure it works the way you expect.

lianos commented 8 years ago

Nailed it, thanks!