1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| library(ggplot2)
x <- counts_address1_in$time y1 <- counts_address1_in$count.Freq y2 <- counts_address2_in$count.Freq y3 <- counts_address3_in$count.Freq
plot(x, y1, type="b", pch = 25, bg="red", col="red", ylim=c(0,600), xlab="time", ylab="number", main="进站客流") axis(1, at = x) lines(x, y2, type="b", pch = 21, bg="blue", col="blue") lines(x, y3, type="b", pch = 15, col="green") legend("topright", legend=c(col_values1[1], col_values2[1], col_values3[1]), col=c("red", "blue", "green"), lty=1, cex=0.8)
xout <- counts_address1_out$time y1out <- counts_address1_out$count.Freq y2out <- counts_address2_out$count.Freq y3out <- counts_address3_out$count.Freq
plot(xout, y1out, type="b", pch = 25, bg="red", col="red", ylim=c(100,800), xlab="time", ylab="number", main="出站客流") axis(1, at = xout) lines(xout, y2out, type="b", pch = 21, bg="blue", col="blue") lines(xout, y3out, type="b", pch = 15, col="green") legend("topright", legend=c(col_values1[1], col_values2[1], col_values3[1]), col=c("red", "blue", "green"), lty=1, cex=0.8)
|