R language Access Menu

A useful graphics package

ggplot2 is a very useful package with simple syntax for many types of graphs. First part is to define the data.frame to be used:

code:
       > library(ggplot2)        
       > gg = ggplot(bwdf, aes(x=age, y=lwt))

Then add layers of plot to this.

For points: 
code:
        > gg = gg + geom_point()

For plotting, just call the gg object: 
code:
        > gg
output (graph): 

                     graph2


    Comments & Feedback