Graphics Reference
In-Depth Information
level has a numeric value of 1, the second level has a value of 2, and so on. You can specify
the numerical intercept manually, or calculate the numerical value using which(levels(...))
( Figure 7-9 ) :
pg <- ggplot(PlantGrowth, aes(x = group, y = weight)) + geom_point()
pg + geom_vline(xintercept = 2 )
pg + geom_vline(xintercept = which(levels(PlantGrowth$group) == "ctrl" ))
Search WWH ::




Custom Search