Created
February 28, 2015 22:59
-
-
Save gsk3/825147e8f5f2860a4a9d to your computer and use it in GitHub Desktop.
Taxonomy of Conference Questions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A Taxonomy of Conference Questions | |
# Ari B. Friedman | |
# www.abfriedman.com | |
# 5/26/2013 | |
set.seed(8) | |
n <- 537 | |
plot.main <- paste("Distribution of",n,"questions\n in a convenience sample of 15 conferences") | |
x <- rexp(n,2) | |
y <- rexp(n,2) | |
sel <- (y>=0&x>=0)# & (y<1.7&x<1.7) | |
x <- x[sel] | |
y <- y[sel] | |
# Add a little density to the high end | |
nNorm <- 5 | |
x[seq(length(x)+1,length(x)+nNorm)] <- rnorm(nNorm,2.5,.5) | |
y[seq(length(y)+1,length(y)+nNorm)] <- rnorm(nNorm,2,.5) | |
sel <- (y<3&x<3) | |
x <- x[sel] | |
y <- y[sel] | |
# Prep for plotting | |
xrange <- range(x) | |
yrange <- range(y) | |
confQ <- data.frame(x=x,y=y) | |
textDF <- data.frame(x=2.5,y=.05,label="abfriedman.com") | |
png(file.path(.db,"misc/Taxonomy_of_Conference_Questions","Taxonomy_of_Conference_Questions.png"), height=625, width=800) | |
p <- ggplot(confQ, aes(x=x,y=y)) + geom_point() + | |
xkcdaxis(xrange,yrange) + | |
xlab(NULL) + scale_x_continuous( | |
breaks = range(x), | |
labels = c("Rambling","Succinct") | |
) + | |
ylab(NULL) + scale_y_continuous( | |
breaks = range(y), | |
labels = c("I'm going to talk about\n my pet issue","Relevant") | |
) + | |
ggtitle(plot.main) + | |
geom_text(aes(x=x,y=y,label=label),data=textDF,colour="lightgrey") | |
p | |
dev.off() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment