geyser.data.csv

#make it work and make it pretty
#
#read in data file
mydat<-read.csv("geyser.data.csv",header=T)
#
#coordinates of the figure region: fig=c(x1,x2,y1,y2)
#margin to borders: mar=c(bottom, left, top, right)
# you may have to use the mgp() functions to adjust the titles (see help(par))
#mgp controls the distance of title mgp[1] and axes mgp[2:3]
#default is mgp=c(3,1,0)
#
#adjust the parameters!!!
par(fig=c(0,0,0,0),mar=c(0,0,0,0))
hist(mydat[,2], xlab="Waiting Time", main = "Histogram of Waiting Time",mgp=c(1.7,0.5,0))
#
#adjust the parameters!!!
par(fig=c(0,0,0,0),mar=c(0,0,0,0),new=TRUE)
plot((mydat[,2]),(mydat[,3]),pch= "*",cex = 1.5, xlab="Waiting Time",ylab="Duration of Eruption", main = "Geyser Data Set",mgp=c(2,1,0))
#
#adjust the parameters!!!
par(fig=c(0,0,0,0),mar=c(0,0,0,0), new=TRUE)
boxplot(mydat[,3], main = "Boxplot of Duration")
solution