Commit 93826c57 authored by Barry Rowlingson's avatar Barry Rowlingson

add more plots

parent 866af663
do_all <- function(){
par(mfrow=c(4,3))
linear()
quadratic()
logarithmic()
exponential()
loess_plot()
linear_no_slope()
logistic()
confidence()
piecewise()
connecting_lines()
ad_hoc()
house_of_cards()
}
......@@ -10,7 +10,7 @@ xo = function(){
baseplot <- function(name){
plot(xkcd$x, xkcd$y, pch=19, cex=2, asp=1, bty="n", axes=FALSE, xlab="", ylab="")
box(bty="L", col="grey", lwd=5)
text(0.1, 9,name, cex=3, adj=0, col="grey")
text(0.1, 9,name, cex=3, adj=0, col="grey", xpd=NA)
}
###
......@@ -93,7 +93,9 @@ logistic <- function(){
}
### 8. confidence interval
confidence <- function(){
baseplot("CI-TODO")
}
### 9. piecewise
......@@ -116,9 +118,19 @@ piecewise <- function(){
### 10. connecting lines
connecting_lines <- function(){
baseplot("CONNECTING\nLINES")
lines(xkcd$x, xkcd$y, col=xo()$col, lwd=xo()$lwd)
}
### 11. ad-hoc filter
### 11. ad-hoc filter
ad_hoc <- function(){
baseplot("AD-HOC TODO")
}
### 12. house of cards
house_of_cards <- function(){
baseplot("HOC - TODO")
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment