I tried to make a circular plot (group some countries) but the labels are not on the country’s values. They are displayed randomly.
Used this datadata used
data <- read_xls("C:/Users/Merry/Downloads/data.xls")
data$id <- seq(1, nrow(data))
view (data)
p <- ggplot(data, aes(x=as.factor(id), y=value)) +
geom_col(stat="identity", fill=alpha("purple", 0.3)) +
ylim(-100,120) +
theme_minimal() +
theme(
axis.text = element_blank(),
axis.title = element_blank(),
panel.grid = element_blank(),
plot.margin = unit(rep(-2,4), "cm")
) +
coord_polar(start = 0) + geom_text(data=label_data, aes(x=id, y=value, label=Country), color="black", fontface="bold",alpha=0.6, size=2.5, angle= label_data$angle, hjust=label_data$hjust, inherit.aes = FALSE)
p```
Resulted plot [2]
[2]: https://i.sstatic.net/6HKYZf8B.png