# You can find pch values for shapes here:
# https://cdn-images-1.medium.com/max/1600/1*0QEVFHrgqmkVsCVCQceh6w.jpeg
data <- data.frame(
Name = c("Ohio State", "Purdue", "Indiana", "Wisconsin", "Nebreaska"),
Min = c(0.37, 0.25, 0.13, 0.22, 0.28),
Max = c(0.88, 0.57, 0.68, 0.77, 0.63),
Value = c(0.51, 0.32, 0.24, 0.65, 0.57),
Pch = c(1, 2, 5, 6, 22),
stringsAsFactors = FALSE
)
data
## Name Min Max Value Pch
## 1 Ohio State 0.37 0.88 0.51 1
## 2 Purdue 0.25 0.57 0.32 2
## 3 Indiana 0.13 0.68 0.24 5
## 4 Wisconsin 0.22 0.77 0.65 6
## 5 Nebreaska 0.28 0.63 0.57 22
# Graph margins
par(mar = c(6.1, 4.1, 3.1, 2.1))
plot(1:nrow(data),
col = "white",
ylim = c(0, 1),
xlab = "",
ylab = "Coolness",
xaxt = "n")
title(xlab = "Schools", line=5)
for (i in 1:nrow(data)) {
segments(i, data$Min[i], i, data$Max[i])
points(i, data$Value[i], pch = data$Pch[i])
}
axis(1, at = 1:nrow(data), labels = data$Name, las=2)