R language Access Menu

Title Text Both  

Coloring the points by a grouping variable

It is often needed to color the plotted points according to the group they belong. This can be easily done by specifying the grouping variable as the color of points.

    > ggplot(bwdf, aes(x=age, y=lwt, col=low))+ geom_point()

output (graph): 



    Comments & Feedback