Can I add data labels on my radar chart using ggradar in Rstudio?

88 Views Asked by At

I just started using Rstudio to draw charts for my projects. And while I'm trying I have problem adding data labels on my radar chart. I hope that I can mark every number on my radar chart to make it clearer. Also, I don't know why the edges of some of my names are cut off. The following picture is a sample of what my radar chart looks like and my code.

for (i in 1:num_rows) {
  selected_data <- scaled_data[i, ]
  
  radar_data <- rbind(selected_data, new_column_means)
  
  chart_name <- paste(name_list[i])
  
  # Create the radar chart
  radar_chart <- ggradar(radar_data, 
                         grid.min = 0, grid.mid = 0.5, grid.max = 1, 
                         base.size = 15, plot.title = chart_name,legend.text.size = 10, legend.position = "bottom") + scale 
  filename <- paste(name_list[i], ".png", sep = "")
  
  # Save the radar chart as a PNG file
  ggsave(filename, plot = radar_chart, width = 8, height = 6, dpi = 300)
}

Hopefully someone can help me solve my problem, thanks!

0

There are 0 best solutions below