我想使用plotly创建雷达图,但我想知道R中是否有任何方法可以在图表上有边而不是圆形。
我还没有编写代码,我正在使用plotly网站上的代码,试图在我的数据上实现它之前找到方法,所以我无法附加 dput()。
我看到标准输出是这样的:
我想要更有可能的东西:
编辑:附加可重现的标准输出
````
library(plotly)
fig <- plot_ly(
type = 'scatterpolar',
r = c(39, 28, 8, 7, 28, 39),
theta = c('A','B','C', 'D', 'E', 'A'),
fill = 'toself'
)
fig <- fig %>%
layout(
polar = list(
radialaxis = list(
visible = T,
range = c(0,50)
)
),
showlegend = F
)
fig
````
已解决:将
gridshape = 'linear'
添加到 layout()
,这对我有用