ggradar2
is now available. A large amount of features have been added to make your radar chart powerful. See ggradar2
on my Github
Introduction
ggradar2 is a gg-function to draw a radar plot for data analysis. It is stem from ggradar but has been extended with more cool features.
Install ggradar2
Run the code
1 | devtools::install_github("xl0418/ggradar2",dependencies=TRUE) |
Use ggradar2
Load data.
1 | library(ggradar2) |
Default style
By default
1 | ggradar2(dftest) |
returns
No fill with round grid
If you don’t want to fill the polygon, run
1 | ggradar2(dftest,polygonfill = FALSE) |
Web type
A new web type ‘lux’ has been added by webtype
.
mini type
1 | ggradar2(dftest,webtype = 'mini') |
luxurious type
1 | ggradar2(dftest,webtype = 'lux') |
Gird line trend
Use grid.line.trend = 'increase'
to plot an outward-increasing grid lines.
1 | ggradar2(dftest,style = 'sharp',webtype = 'lux', |
Full score
Use fullscore = c(...)
to set the full score to each variable.
1 | fullscore <- c(100,10,300,150,10,10) |
Sharp grid
A new style has been added. Call out the straight line style by running
1 | ggradar2(dftest,style = 'sharp') |
Sharp grid without fill
Get rid of the fill
1 | ggradar2(dftest,style = 'sharp',polygonfill = FALSE) |
Removing the legend
1 | ggradar2(dftest,style = 'sharp', |
Multiple plots by subgroups
1 | # Extract 3 brands of cars out of the data frame |
Notice that the column name for the subgroups should be ‘facet1’. Otherwise, ggradar2 could not recognize it.