R language Access Menu

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.

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

output (graph): 

                       graph3


    Comments & Feedback