我想绘制fda包中加拿大天气数据的月平均温度图表。但是,不会显示x轴网格线名称。
我使用的是来自fda软件包的加拿大月平均气温数据。
op1 <- par(mar=c(5, 4, 4, 5)+.1)
stations_all <- c("St.Johns", "Halifax", "Sydney","Yarmouth","Charlottvl","Fredericton","Scheffervll","Arvida","Bagottville","Quebec","Sherbrooke","Montreal","Ottawa","Toronto","London","Thunderbay","Winnipeg","The Pas","Churchill","Regina","Pr. Albert","Uranium Cty","Edmonton","Calgary","Kamloops","Vancouver","Victoria","Pr. George","Pr. Rupert","Whitehorse","Dawson","Yellowknife","Iqaluit","Inuvik","Resolute")
matplot(CanadianWeather$monthlyTemp,type="l", axes=FALSE, xlab="month", ylab="monthly Temperature (deg C)")
axis(2, las=1)
# Label the horizontal axis with the month names
axis(1, 1:12, labels=FALSE)
axis(1, monthMid, monthLetters)未显示x轴网格线名称。
发布于 2019-08-25 14:05:23
你可以试试
library(fda)
matplot(CanadianWeather$monthlyTemp,type="l", axes=FALSE,
xlab="month", ylab="monthly Temperature (deg C)")
axis(2, las=1)
axis(1, 1:12, month.abb)

https://stackoverflow.com/questions/57643558
复制相似问题