lrod1994
lrod1994

Reputation: 29

How to increase the inner circle diameter?

I am creating a radar plot from ggradar and I would like to know if there is any possibility of increasing the inner circle diameter while keeping its grid.min value to 0. From the following code:

ggradar(df.plot,
          grid.min = 0, grid.mid = 50, grid.max = 100,
          background.circle.colour = "white",
          axis.line.colour = "gray60",
          gridline.min.colour = "gray60",
          gridline.mid.colour = "gray60",
          gridline.max.colour = "gray60",
          gridline.min.linetype = 1,
          gridline.mid.linetype = 1,
          gridline.max.linetype = 1,
          group.colours = lcols[1:nrow(df.plot)],
          legend.title = "Grupo",
          legend.position = "bottom",
          group.line.width = 2,
          group.point.size = 2,
          fill = TRUE,
          fill.alpha = 0.2,
          axis.label.offset = 1.2,
          gridline.label.offset = 15)

I obtain this plot:

enter image description here

However, I would like to increase the size of the diameter of the inner circle so that this looks better like in the image below. I know I can modify the grid.max value so that the plot looks better but I want to compare this plot with other ones where there are near 100% values.

enter image description here

Upvotes: 1

Views: 48

Answers (1)

Quinten
Quinten

Reputation: 41521

It is hard without reproducible example data. You could change the centre.y value change the inner circle like this:

library(ggradar)
ggradar(df) 

ggradar(df,
        centre.y = -0.5) 

Created on 2024-05-10 with reprex v2.1.0


Data from this example:

set.seed(4)
df <- data.frame(matrix(runif(30), ncol = 10))
df[, 1] <- paste0("G", 1:3)
colnames(df) <- c("Group", paste("Var", 1:9))

Upvotes: 0

Related Questions