I am using the following script to create a multitude of radar plots for analysis. I want to add some sized arrows and a circle in the middle of the radar plot. annotate() and geom_rect() do, maybe amongst other functions, not work with coord_radar.
This question has been posed before, but that workaround (See here) is not since I need the use of geom_ribbon() for the range.
library(ggplot2)
library(stringr)
Plot = ggplot(df,
aes(x=Column,
y=mean,
group=Class)) +
geom_ribbon(aes(ymin = value1,
ymax = value2),
fill = "#1c4f96",
alpha = 0.50) +
geom_line() +
labs(x=NULL,
y=NULL) +
coord_radar()
What could be a workaround to manually add a circle/arrow/box to the plots?
I think you are mistaken.
annotate()works fine in your sample code. Maybe you were using it incorrectly?For example, see the code below where I've added a red circle and a green arrow to the plot. The idea is that the labels on the diagram
V1toV8correspond to the numbers1to8. A circle is just a line fromx = 0tox = 9at a constantyvalue. An arrow is a line from the starting point to where you want it to point, with arrow parameters added.Created on 2023-07-10 with reprex v2.0.2