I am looking for a solution to change the axes label colors in radarchart
library(fmsb)
# Create data: note in High school for several students
set.seed(99)
data=as.data.frame(matrix( sample( 0:20 , 15 , replace=F) , ncol=5))
colnames(data)=c("math" , "english" , "biology" , "music" , "R-coding" )
rownames(data)=paste("mister" , letters[1:3] , sep="-")
# To use the fmsb package, I have to add 2 lines to the dataframe: the max and min of each topic to show on the plot!
data=rbind(rep(20,5) , rep(0,5) , data)
#==================
# Plot 1: Default radar chart proposed by the library:
radarchart(data)
I would like to have a different color for each math , english , biology , music , R-coding. I have tried with col.lab but it doesn't work.
I looked into the function
radarchartand found that the color is not based on one of the inputs. I adjusted the function to make it work. You can use this:after running this function:
It is the same except for
VLABELSpart wheretext()is used to plot thevlabelsand added thevlabcolto the input.