首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >X轴网格线名称未显示在图表上

X轴网格线名称未显示在图表上
EN

Stack Overflow用户
提问于 2019-08-25 13:44:52
回答 1查看 28关注 0票数 0

我想绘制fda包中加拿大天气数据的月平均温度图表。但是,不会显示x轴网格线名称。

我使用的是来自fda软件包的加拿大月平均气温数据。

代码语言:javascript
复制
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轴网格线名称。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-08-25 14:05:23

你可以试试

代码语言:javascript
复制
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)

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57643558

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档