tata3 <- data.frame(Subtype = c("Prostate", "Oesophagus", "Breasr"), alive = c(88, 22, 100), dead = c(12, 55, 17), uncertain = c(10, 2, 2), total = c(186,46,202))
Above is dataframe. I then tried code below to get a pie chart
ggplot(tata3, aes(x = "", y = total, fill=Subtype)) + geom_col(width=1, color=1) + coord_polar(theta = "y") + geom_label_repel(data=tata3, aes(y= total, label = paste0(total)), size = 3, nudge_x = 3, show.legend = FALSE)
Hello, I want the following if possible
1)The label to appear more neatly - as per the graph you can see the lines on the labels really are not positioned properly
2) Any way of making the values for each pie chart that are displayed also appear in percentages next to it, ideally by incorporating the library(scales) package.
Thanks very much