Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (24 sloc) 1.1 KB
library(ggplot2)
library(grid)
event = data.frame(
DETAILS = c('> Los Angeles', 'California', 'June 30-July 3','2014'),
NAME = c('u','s','e','R!'),
COLOR = factor(c(1, 1, 1, 2), levels = c(1, 2))
)
event$DETAILS = factor(event$DETAILS, levels = event$DETAILS)
set.seed(2014)
ggplot(event) +
geom_text(aes(x = 0, y=0, label=NAME, color = COLOR,hjust = rnorm(4, 0.5, .2), vjust = rnorm(4, 0.5, .2)), size = rel(35), face = 'bold') +
facet_grid(~DETAILS) +
theme_bw() +
theme(axis.title = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
strip.text = element_text(hjust = 0, size = rel(1.25), face = 'bold', color = '#226666', family='mono'),
strip.background = element_rect(fill = 'white', colour = 'white'),
panel.background = element_rect(fill = ('#D3EE9E')),
panel.border = element_blank(),
plot.margin = unit(c(-0.5,1,-1,0), 'lines')) +
coord_fixed(xlim = c(-3, 3), ylim = c(-2.25, 2.25)) +
scale_color_manual(guide='none', values = c('#FFFFFE', '#669999'))
ggsave('tshirtImage.png', width = 8.5, height = 2)