You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In general selected.* aesthetics are to let the plot designer answer the question, "how should the geom look after it is clicked?" right now in animint we use a simple heuristic which is not configurable by the plot designer
when a geom_rect is clicked we set its border (stroke) color to black. Otherwise it has no border. Using selected.* aesthetics we could say color=NA and selected.color="black"
when any other geom is clicked we set its alpha (opacity) to 0.5 more than the value that was specified in the R code. using selected.* aesthetics we could say alpha=0.5 and selected.alpha=1, or alpha=0 and selected.alpha=0.5.
The idea of selected.* aesthetics is to make this behavior more configurable, so the designer can change what the geoms look like after they are clicked. However if you implement this new feature, please make sure to respect these settings as defaults.
@viswaraavi here are detailed answers to your questions.
For this example
p <- ggplot() +
geom_point(data = tips,
aes(x = total_bill, y = tip, colour = sex_smoker),selected.colour="Red")
we will have all the legends selected and all the data is shown and the legends will
respond to mouse clicks and update selection.
that is correct. However, the selected.colour will have no effect, since there is no clickSelects aesthetic specified. selected.colour="red" means that the point color should be changed to red when the point's clickSelects value is selected.
What will be the difference between specifying colour and selected.colour?
Is it that if we specify colour all the variable will be shown with colour red. But with
selected.colour we want only selected variable to be in colour red.
selected.colour=red means we want to change the point color to red when it is clicked (has no effect if no clickSelects is specified).
color=red mean we want the point color to be red when it is not clicked.
If this is the
case then if multiple variables are selected then will all have red colour?. If variables are not
selected what colour will they have?
again if you do not specify clickSelects then none of the points will be red. they will all be black (ggplot2 default).
In general selected.* aesthetics are to let the plot designer answer the question, "how should the geom look after it is clicked?" right now in animint we use a simple heuristic which is not configurable by the plot designer
The idea of selected.* aesthetics is to make this behavior more configurable, so the designer can change what the geoms look like after they are clicked. However if you implement this new feature, please make sure to respect these settings as defaults.
@viswaraavi here are detailed answers to your questions.
that is correct. However, the selected.colour will have no effect, since there is no clickSelects aesthetic specified. selected.colour="red" means that the point color should be changed to red when the point's clickSelects value is selected.
again if you do not specify clickSelects then none of the points will be red. they will all be black (ggplot2 default).
if you do specify clickSelects, for example
then I would expect all points corresponding to the selected sex_smoker are red, and other points are black.
The text was updated successfully, but these errors were encountered: