13.16 雷达图
plot_ly(
type = "scatterpolar", mode = "markers", fill = "toself"
%>%
) add_trace(
r = c(39, 28, 8, 7, 28, 39), color = I("gray40"),
theta = c("数学", "物理", "化学", "英语", "生物", "数学"),
name = "学生 A"
%>%
) add_trace(
r = c(1.5, 10, 39, 31, 15, 1.5), color = I("gray80"),
theta = c("数学", "物理", "化学", "英语", "生物", "数学"),
name = "学生 B"
%>%
) layout(
polar = list(
radialaxis = list(
visible = T,
range = c(0, 50)
)
) )