Essentially I have a data frame that I am plotting in ggvis but I want to try to color a couple specific points and add a table to mark what those points mean. So far I am able to add color to those points but I am unable to create the legend identifying that point.
g1 <- subset(ex, p == 0.10)
ex %>% ggvis(x = ~p, y = ~Pa_Achieved) %>% layer_lines() %>%
layer_points() %>% layer_points(data = g1, fill := "red") %>%
add_axis("x", title ="p") %>%
add_axis("y", title = "Pa",
properties=axis_props(labels=list(fontSize=12),
title=list(fontSize=12,dy=-25))) %>%
add_title(title = "Operating Characteristic Curve",
properties = axis_props(title=list(fontSize=20)))
Essentially I would like to add color to this and three other points, and a simple legend identifying what those points are their respective colors and leaving the other points black.