需要幫助繪製時間序列數據中的r。Y是溫度,X是日期(現在格式爲%d-%m-%y),需要繪圖像:以r爲單位繪製時間序列數據明智月份
temp data in month wise along with a box plot
我曾嘗試:
univariare溫
temperature = ts(r$temp, frequency = 12, start = 2011) plot(temperature, xaxt = "n") tsp = attributes(temperature)$tsp dates
= seq(as.Date("2011-01-01"), by = "month", along = temperature) axis(1, at = seq(tsp[1], tsp[2], along = temperature), labels = format(dates, "%m-%y"))
ggplot
gg2=ggplot(r,aes(mnth,temp)) + geom_line()
windows()
print(gg2)
但格式不正確。
任何幫助將真正明顯!
由於 德維
創建爲[此處描述]合適的可再現的示例(https://stackoverflow.com/questions/5963269/how-to-make-a-great -r-reproducible-example)以及'dput'您使用的數據 – parth
請檢查[mcve]。也可以使用ctrl-g將圖形插入問題中(而不是鏈接到它)。 –