library(ggplot2)
chr <- function(x) { rawToChar(as.raw(x)) }
df <- data.frame(value = rnorm(n = 100000))
tops <- data.frame(x = 0, y = 12000)
point1 <- data.frame(x = runif(8, min = -2.1, max = 2.1), y = runif(8, min = 15, max = 2000))
point2 <- data.frame(x = runif(6, min = -1.4, max = 1.4), y = runif(6, min = 2100, max = 4000))
point3 <- data.frame(x = runif(5, min = -1.0, max = 1.0), y = runif(5, min = 4100, max = 8000))
point4 <- data.frame(x = runif(3, min = -0.5, max = 0.5), y = runif(3, min = 8100, max = 10000))
abc <- paste0(substr(msleep$genus[28],1,4), chr(122), " ", 505.5*4,
chr(c(33, 33, 32, 32, 32, 58, 45, 41)) )
ggplot() +
geom_histogram(data = df, aes(x = value), fill = "darkgreen") +
geom_segment(aes(x = 0, y = 0, xend = 0, yend = -2500), size = 15, color = "tan4") +
scale_y_continuous(limits = c(-2500, NA)) +
geom_point(data = tops, aes(x = x, y = y), color = "yellow", size = 15, shape = 8) +
geom_point(data = point1, aes(x = x, y = y), color = "red", size = 8, shape = 18) +
geom_point(data = point2, aes(x = x, y = y), color = "orange", size = 5, shape = 16) +
geom_point(data = point3, aes(x = x, y = y), color = "blue", size = 9, shape = 18) +
geom_point(data = point4, aes(x = x, y = y), color = "red", size = 3) +
theme(axis.title = element_blank(),
axis.ticks = element_blank(),
axis.text = element_blank(),
panel.grid = element_blank(),
panel.background = element_rect(fill = "#0F0F0F"),
plot.title = element_text(hjust = 0.5)) +
ggtitle(abc)