[英]ggradar returns Error: 'plot.data' contains value(s) > grid.max
Given a sample data as follows:给定样本数据如下:
df <- structure(list(date = c("2022-1-31", "2022-2-28"), PMI = c(50.1,
50.2), PMI.import = c(48.4, 49), PMI.export = c(47.2, 48.6)), class = "data.frame", row.names = c(NA,
-2L))
Out:出去:
date PMI PMI.import PMI.export
1 2022-1-31 50.1 48.4 47.2
2 2022-2-28 50.2 49.0 48.6
I try to plot a radar plot with codes below, but none of them returns the plots I expected (need to show small difference of three variables in January and Febrary).我尝试 plot 雷达 plot 使用以下代码,但没有一个返回我预期的图(需要显示一月和二月三个变量的微小差异)。
library(scales)
library(ggiraphExtra)
library(ggradar)
df %>%
mutate_each(funs(rescale), -date) %>%
ggradar()
ggradar(df,
values.radar = c("40", "50", "70"),
grid.min=40, grid.mid=50, grid.max=60
)
and ggradar(df)
returns: Error: 'plot.data' contains value(s) > grid.max
和
ggradar(df)
返回: Error: 'plot.data' contains value(s) > grid.max
Does someone could help?有人可以帮忙吗? I hope to set y limit ie., between 40~70 or 40~60 to show the small changes of data between two months if it's possible.
我希望设置 y 限制,即在 40~70 或 40~60 之间,以显示两个月之间数据的微小变化(如果可能的话)。
Reference:参考:
https://github.com/ricardo-bion/ggradar/issues/7 https://github.com/ricardo-bion/ggradar/issues/7
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.