A solution using ggplot2 (for plotting), tidyr (for converting your table into an easier to process data frame), and dplyr (for working with the data frame):
df <- structure(list(Jan = c(50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L,
50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L, 50L,
60L, 65L, 40L, 50L, 60L, 65L, 40L, 50L, 50L), Feb = c(50L, 60L,
65L, 40L, 50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L, 50L, 60L, 65L,
40L, 50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L,
50L, 50L), Mar = c(50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L, 50L,
60L, 65L, 40L, 50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L, 50L, 60L,
65L, 40L, 50L, 60L, 65L, 40L, 50L, 50L), Apr = c(50L, 60L, 65L,
40L, 50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L,
50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L, 50L,
50L), May = c(50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L, 50L, 60L,
65L, 40L, 50L, 60L, 65L, 40L, 50L, 60L, 65L, 40L, 50L, 60L, 65L,
40L, 50L, 60L, 65L, 40L, 50L, 50L), Jun = c(55L, 66L, 71L, 44L,
55L, 66L, 71L, 44L, 55L, 66L, 71L, 44L, 55L, 66L, 71L, 44L, 55L,
66L, 71L, 44L, 55L, 66L, 71L, 44L, 55L, 66L, 71L, 44L, 55L, 55L
), Jul = c(57L, 68L, 74L, 45L, 57L, 68L, 74L, 45L, 57L, 68L,
74L, 45L, 57L, 68L, 74L, 45L, 57L, 68L, 74L, 45L, 57L, 68L, 74L,
45L, 57L, 68L, 74L, 45L, 57L, 57L), Aug = c(68L, 81L, 88L, 54L,
68L, 81L, 88L, 54L, 68L, 81L, 88L, 54L, 68L, 81L, 88L, 54L, 68L,
81L, 88L, 54L, 68L, 81L, 88L, 54L, 68L, 81L, 88L, 54L, 68L, 68L
)), .Names = c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
"Aug"), class = "data.frame", row.names = c(NA, -30L))
library(ggplot2)
library(tidyr)
library(dplyr)
df.temps <- df %>% select(Mar:Jun) %>% gather(month, temperature)
df.avg <- df.temps %>% group_by(month) %>% summarise(average=mean(temperature))
ggplot() +
geom_point(data=df.temps, aes(x=temperature, y=month), position=position_jitter(width=1, height=0)) +
geom_point(data=df.avg, aes(x=average, y=month), color="red", size=3) +
geom_line(data=df.avg, aes(x=average, y=month, group=NA)) +
labs(x = "Temperature (in F)", y = "Month")
