radar graph
雷达图适用于多维数据(四维以上),且每个维度必须可以排序(国籍就不可以排序)。但是,它有一个局限,就是数据点最多6个,否则无法辨别,因此适用场合有限。
面积越大的数据点,就表示越重要。需要注意的时候,用户不熟悉雷达图,解读有困难。使用时尽量加上说明,减轻解读负担。
Scatter---line--bar---pie Bubble --radar
下载包
install.packages("radarchart")
加载包
library("radarchart")
labs <- c("Communicator", "Data Wangler", "Programmer",
"Technologist", "Modeller", "Visualizer")
scores <- list( "Rich" = c(9, 7, 4, 5, 3, 7),"Andy" = c(7, 6, 6, 2, 6, 9),"Aimee" = c(6, 5, 8, 4, 7, 6))
不带标签的数值表示
chartJSRadar(scores = scores, labs = labs, maxScale = 10)
带着标签的数值
chartJSRadar(scores = scores, labs = labs,showRoolTipLabel=TRUE)
labs <- c("面向函数式", "面向对象", "面向过程", "脚本式")
scores <- list( "Scala" = c(9, 7, 6, 5),"Java" = c(7, 7, 5, 2),"Python" = c(6, 6, 8, 6) )
chartJSRadar(scores = scores, labs = labs, showRoolTipLabel=TRUE)
参考:
https://github.com/mangothecat/radarchart
https://cran.r-project.org/web/packages/radarchart/radarchart.pdf