0

I've done the following plot so far:

enter image description here

Is it possible to add numbers from 1 to x inside the square where there's the color in the legend, and add a label inside the pie-chart referencing to the number instead of adding the entire label?

EDIT. Code:

 ggplot(BP, aes(x=1, y=Enrichment_Score, fill=GO.ID)) +
    geom_bar(stat="identity") +
    coord_polar(theta='y') +
    guides(fill=guide_legend(override.aes=list(colour=NA), nrow=6)) +
    theme(axis.ticks=element_blank(), axis.title=element_blank(), axis.text=element_blank(), panel.grid  = element_blank(), legend.position="bottom") +
    ggtitle("Biological Processes")

Data (just few rows):

GO.ID                                       Enrichment_Score
kinetochore organization                    18.085646
defense response to Gram-negative bacterium 18.085646
cell wall repair                            18.085646
user2979409
  • 773
  • 1
  • 12
  • 23
  • Could you post the code and the data as well so helpful SO people can make changes to it? – ilir Oct 14 '14 at 10:12
  • Do you want to move the actual labels inside the chart like in [this post](http://mathematicalcoffee.blogspot.com/2014/06/ggpie-pie-graphs-in-ggplot2.html) or do you just want numbers both in the legend boxes and in the chart as labels? – aosmith Oct 14 '14 at 22:03
  • I wanna see numbers 1, 2... inside the squares (legend) where the color is. Maybe modifying `override.aes`? – user2979409 Oct 16 '14 at 10:54

0 Answers0