Rで折れ線グラフを作成しましたが、同じcsvファイルの別の列にすでに存在する最小値と最大値の2行を追加したいと考えています。これが私が使用した私のコードです
plot(MedTemp$Loggers.distance, MedTemp$Temperature..C...2017., xaxt = "n", xlab = "",ylab = "", main = "Median Temperature 2017", col.main = "darkred", col = "blue", pch = 19, ylim = c(-5,25), fill = "blue", type = "o")
axis(1, at = c(0, 4698.91, 5424.74, 8731.54, 10103.81, 14361.29 ), cex.axis = 0.55, las = 2)
lines(MedTemp$Loggers.distance[order(MedTemp$Loggers.distance)], MedTemp$Temperature..C...2017.[order(MedTemp$Loggers.distance)], xlim = range(MedTemp$Loggers.distance), ylim = range(MedTemp$Temperature..C...2017.), pch = 16, col = "firebrick", lwd = 1.5)
text(MedTemp$Temperature..C...2017.~ MedTemp$Loggers.distance, labels = c(" ","Orchar\nHill","Roland\nRoad","Gilligan\nRoad","Wetaskiwin"," "), cex = 0.5, font = 2, pos = 1, srt = 0)
text(MedTemp$Temperature..C...2017.~ MedTemp$Loggers.distance, labels = c("Rice\nRoad"," "," "," "," "," "), cex = 0.5, font = 2, pos = 1, srt = 0)
text(MedTemp$Temperature..C...2017.~ MedTemp$Loggers.distance, labels = c(" "," "," "," "," ","Decew\nRoad"), cex = 0.5, font = 2, pos = 1, srt = 0)
mtext(1, text = "Thermal Loggers Chainage Distance(m)", line = 3, cex = 0.9)
mtext(2, text = "Temperature (C)", line = 3, cex = 0.9)
ここに私のデータがあります:
ここに私のチャートがあります:
どんな助けでも大歓迎です。