如何将openair包中windRose函数中的轴标签从NESW更改为NOSW?

问题描述 投票:0回答:1

我正在尝试将风玫瑰图中基点的轴标签从 NESW 更改为 NOSW,因为我想用德语展示我的图表。有没有简单的方法呢?

我从windRose函数中获取了整个代码并更改了axislabs的部分<- c("N", "E", "S", "W") to axislabs <- c("N", "O", "S", "W") in Line 410. I then saved it under a new name windRose_D. I've downloaded the package lattice but I still get the error: Error in checkNum(mydata, vars = c(ws, wd)) : could not find function "checkNum". I don't know where I can find the package with the checkNum function...

是否有更简单的方法来更改轴标签而不更改完整功能?

r axis-labels openair windrose
1个回答
0
投票

通过反复试验,使用

body
函数修改
windRose
的元素,我们可以执行以下操作...

body(windRose)[[70]][[3]][["panel"]][[3]][[11]][[3]][[9]][[4]][[2]][[3]][[3]] <- "O"

windRose(mydata)

© www.soinside.com 2019 - 2024. All rights reserved.