#Code used to generate class 6 slides #---------------------------------- # Slides: histograms x = c(1, 1.2, 1.3, 1.6, 1.6, 2.1, 2.2, 2.6, 2.7, 3.1, 3.2, 3.4,3.8,3.9,3.9) b = seq(0,4,.5) m = c(3,7,2,2) + .1 lab = 3 ax = 2 par(mar = m) hist(x,breaks=b, main='', xlab='', col='red', cex.lab=lab, cex.axis=ax) hist(x,breaks=b, main='', xlab='', col='orange',cex.lab=lab, cex.axis=ax,freq=F) b = c(0,1,3,4) # The first hist command generates a warning because frequency historgrams with # unequal bin widths have misleading areas hist(x,breaks=b, main='', xlab='', col='purple', cex.lab=lab, cex.axis=ax,freq=T) hist(x,breaks=b, main='', xlab='', col='magenta', cex.lab=lab, cex.axis=ax,freq=F) #Done in RStudio exported through GUI #----------------------------------