source("http://www.openintro.org/stat/data/arbuthnot.R") arbuthnot ?plot plot(arbuthnot) plot(x = arbuthnot$year, y = arbuthnot$girls) # you can add a title to your graph plot(x = arbuthnot$year, y = arbuthnot$girls, main="Title") # you can add text to your plot text(1700,3000, "Hi there") plot(arbuthnot$year, arbuthnot$boys + arbuthnot$girls, type = "l") plot(x,y,main="Scatterplot",xlab="x-values",ylab="y-values",col="blue") # you can add points points(3,9,col="red") points(2,8,pch=2,col="green") # plot the function f(x)=x^2 x=seq(-5,5,0.1) f=function(x){x^(2)} plot(x,f(x),type="l",col="red") # you can specify tick marks axis(1,at=seq(-5,5,1)) # the '1' indicates we are adding ticks to the x-axis # let's consider the function persp ?persp example("persp") # take a look at current library of packages library() # you can install packages install.packages("mapproj") example("map") # you probably will get an error message # you will need to load a package at the start of every session library(maps) example("map")