5

Is there a way to avoid overlapping p axis labels? Have seen others suggest creating jitter, using direct.labels, etc., but have not found a way to make this work for radarchart{fmsb}

Would be fine with a general pointer toward a radarchart option or another function, but here is some reproducible code anyway:

library(fmsb)
MM<-data.frame(matrix(c(rep(1,35), rep(0,35), 
    runif(35, 0, 1), runif(35, 0, 1)), nrow=4, ncol=35, byrow=TRUE))

colnames(MM)<-rep('long variable name', 35)
colors_border=c( rgb(0,0,0,0.9), rgb(1,0,0,0.9))
colors_in=c( rgb(0,0,0,0.2), rgb(1,0,0,0.3))

radarchart(MM  , axistype=1 , 
      pcol=colors_border , pfcol=colors_in , plwd=2 , plty=1,
      cglcol="grey", cglty=1, axislabcol="grey", cglwd=0.8, 
      caxislabels=c(0, 0.25, 0.5, 0.75, 1),
      vlcex=0.8,
      title='title',
      na.itp=FALSE)

enter image description here

(Making the text smaller works, but that would be my last resort).

MrFlick
  • 195,160
  • 17
  • 277
  • 295
user5807201
  • 61
  • 1
  • 6
  • are you dead set on using fmsb or would you be open to other packages accomplishing this task -say ``stars`` (in base package) or ``ggplot``? – Cyrus Mohammadian Sep 08 '16 at 18:50
  • If making the text smaller works then you can do that with `vlcex`. You can also just make the chart larger or some combination of the 2. – Hack-R Sep 08 '16 at 18:52
  • @CyrusMohammadian I'm open to using other packages! Which would you recommend? – user5807201 Sep 08 '16 at 18:54
  • This package generally produces prettier radar plots than `ggplot2` however if you're interested in rotating the labels at an angle then I know we can do that in `ggplot2`. Not sure if it would help with this one or not since the labels are so long. – Hack-R Sep 08 '16 at 18:58
  • Thanks! I'll give ggplot / ggradar a try! – user5807201 Sep 08 '16 at 19:32

0 Answers0