Consider a simple ggplot2 graph
library(ggplot2)
dat <- data.frame(name=c("apple", "orange", "plum"),value=c(3,8,2),outlier=c(FALSE,TRUE,FALSE))
ggplot(dat)+geom_point(aes(x=value,y=name))
Is there a way to modify styles attributes of the axis y labels (say color) conditionally, for example depending on the outlier
column in dat
?
The result would be something like
On a graph with a large number of items this feature wold greatly improve the graph readability and impact.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…