I was plotting a data.frame in R in a pie graph. Here is the code
library(plotrix)
piepercent<- round(100*cause_wise$suicides/sum(cause_wise$suicides), 1)
png(file = "plots/cause suicide.png")
pie3D(cause_wise$suicides,labels = piepercent,explode = 0.1,
main = "Suicide by Gender(in percentages)")
#legend("topright", cause, cex = 0.8, fill = rainbow(length(cause)))
dev.off()
The data.frame which I am trying to plot here has 38 values, I want to leave out those values which do not contribute significantly to the piepercent
into one big area say less than 2%. Is there a way I can do this?
Here is how the graph looks like: