This is the data:
structure(list(SAPvsSH = c(-23.8789646372585, NaN, -10.8009305417082,
-11.8411770633881, -19.000246852629, -14.364572544966, -21.8175372410621,
-25.4455825234135, -16.3659714913407, -24.2952691912406, -0.794961013892774,
9.27790872080566, -20.9411764705882, -20.3132576468705, -25.1353910061732,
-17.0200414318061), Tooth = c("UI1", "LI1", "UI2", "LI2", "UC",
"LC", "UP3", "LP3", "UP4", "LP4", "UM1", "LM1", "UM2", "LM2",
"UM3", "LM3")), .Names = c("error", "Tooth"), class = "data.frame", row.names = c("UI1",
"LI1", "UI2", "LI2", "UC", "LC", "UP3", "LP3", "UP4", "LP4",
"UM1", "LM1", "UM2", "LM2", "UM3", "LM3"))
I use coord_polar()
from ggplot
to generate a radar chart. This is the code:
ggplot(data=dataset, aes(x=Tooth, y=error)) +
geom_point(size=1.5) +
geom_line() +
geom_hline(aes(yintercept=0), lwd=1, lty=2) +
geom_area(alpha=0.2, position = position_identity()) +
coord_polar() +
theme_bw()
And I get something like this:
What do I need?
Trace a line that connects all the points (like this). The difference with the radar in the link is that here we have only one group and not 3.
Color the area defined by the previous line respect the dashed circle line seen in the previous plot, just in the same way as here. Our reference here is the dashed black line, this is important.
Separating the tags from the outer circle, to avoid tags to be overimposed.
Remove the outer square.