I have the following data:
tmp1 = data.frame(x=c(1,2,3),y=c(1,3,10))
tmp2 = data.frame(x=seq(0,4,.1),y=seq(0,4,.1)^2)
And I would like to make a plot with dots from tmp1 and line from tmp2. I am trying:
ggvis(data=tmp1,x=~x,y=~y) %>% layer_points() %>% layer_lines(data=tmp2,x=~x,y=~y)
Is there someone who knows how to make this code work?
A simple solution:
ggvis(data=tmp2, x=~x, y=~y) %>%
layer_lines() %>%
layer_points(data=tmp1, x=~x, y=~y)