#par(pin=c(3,2))
pdf('/Users/mcmcclur/Documents/html/classes/Fall2017Stat185/ProblemSheets/p1.pdf')
par(mfrow=c(1,2))
d = c(10,20,21,14,18)
pie(d, labels=c(59,84,27,32,8))
barplot(d, names=c(59,84,27,32,8), asp=1/3)
dev.off()
null device 
          1 
#par(pin=c(3,2))
pdf('/Users/mcmcclur/Documents/html/classes/Fall2017Stat185/ProblemSheets/p2_2.pdf')
par(mfrow=c(2,2))
set.seed(2)
d = rnorm(1000)
d2 = rexp(1000)
hist(c(d-2,d+3), col='gray', main='(a)', xlab='',ylab='')
hist(d2, col='gray', main='(b)', xlab='',ylab='')
hist(d, col='gray', main='(c)', xlab='',ylab='')
hist(c(d2, d+5), col='gray', main='(d)', xlab='',ylab='')
dev.off()
null device 
          1 
#par(pin=c(3,0.2))
par(mar=c(0.1,0.5,0.1,0.5))
pdf('/Users/mcmcclur/Documents/html/classes/Fall2017Stat185/ProblemSheets/p2_1.pdf', width=5, height=2)
set.seed(2); d = round(20*runif(121)+30)
boxplot(d, horizontal = T)
dev.off()
quartz_off_screen 
                2 
LS0tCnRpdGxlOiAiUiBOb3RlYm9vayIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKYGBge3J9CiNwYXIocGluPWMoMywyKSkKcGRmKCcvVXNlcnMvbWNtY2NsdXIvRG9jdW1lbnRzL2h0bWwvY2xhc3Nlcy9GYWxsMjAxN1N0YXQxODUvUHJvYmxlbVNoZWV0cy9wMS5wZGYnKQpwYXIobWZyb3c9YygxLDIpKQpkID0gYygxMCwyMCwyMSwxNCwxOCkKcGllKGQsIGxhYmVscz1jKDU5LDg0LDI3LDMyLDgpKQpiYXJwbG90KGQsIG5hbWVzPWMoNTksODQsMjcsMzIsOCksIGFzcD0xLzMpCmRldi5vZmYoKQpgYGAKCmBgYHtyfQojcGFyKHBpbj1jKDMsMikpCnBkZignL1VzZXJzL21jbWNjbHVyL0RvY3VtZW50cy9odG1sL2NsYXNzZXMvRmFsbDIwMTdTdGF0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