Hello all, please I will need help to visualize the fittings of the data labels clearly in the gauge plot.
Below is the code and a screenshot of the result.
....
ggplot()+
geom_polygon(data=get.poly(breaks[1],breaks[2]),aes(x,y),fill="forestgreen")+
geom_polygon(data=get.poly(breaks[2],breaks[3]),aes(x,y),fill="gold")+
geom_polygon(data=get.poly(breaks[3],breaks[4]),aes(x,y),fill="red")+
geom_text(data=as.data.frame(breaks), size=4.5, fontface="bold", vjust=0, hjust=0, color="#FFFFFF",
aes(x=cos(pi*(1-breaks/100)),y=sin(pi*(1-breaks/100)),label=c("","Promoters", "Passive", "Detractors")))+
annotate("text",x=0,y=0,label=round(pos, digits = 2),vjust=0,size=12,fontface="bold", color="#FFFFFF")+
coord_fixed() +
theme_bw()+
theme(axis.text=element_blank(),
axis.title=element_blank(),
axis.ticks=element_blank(),
panel.background=element_rect(fill="#0D0D0D"),
plot.background = element_rect(fill = "#0D0D0D"),
panel.grid=element_blank(),
panel.border=element_blank())
}
Thank you!