Closing the lines in a ggplot2 radar / spider chart

后端 未结 6 1995
时光取名叫无心
时光取名叫无心 2020-12-16 07:11

I need a flexible way to make radar / spider charts in ggplot2. From solutions I\'ve found on github and the ggplot2 group, I\'ve come this far:

library(ggpl         


        
6条回答
  •  渐次进展
    2020-12-16 07:43

    The codes here seem outdated for ggplot2: 2.0.0

    Try my package zmisc: devtools:install_github("jerryzhujian9/ezmisc")

    After you install it, you will be able to run:

    df = mtcars
    df$model = rownames(mtcars)
    
    ez.radarmap(df, "model", stats="mean", lwd=1, angle=0, fontsize=0.6, facet=T, facetfontsize=1, color=id, linetype=NULL)
    ez.radarmap(df, "model", stats="none", lwd=1, angle=0, fontsize=1.5, facet=F, facetfontsize=1, color=id, linetype=NULL)
    

    if you are curious about what's inside, see my codes at github:

    The main codes were adapted from http://www.cmap.polytechnique.fr/~lepennec/R/Radar/RadarAndParallelPlots.html

提交回复
热议问题