gravatar for qicaibiology

2 hours ago by

Dear all:

I am using ggplot to do a barplot for geneOntology in R. The output is fine. However, I can only see the labeling of the bar in the saved png file. But if I saved it as pdf all the content is shown .

How should I adjust the size of the image.

My code is:

p <- ggplot(data=mydata_3, aes(x=Term, y=logPValue), size =1) +
  geom_bar(position = 'dodge', stat='identity', fill = "red") +
  geom_text(aes(x = Term, y = logPValue,label=Count), hjust = -0.5, size = 3, inherit.aes = TRUE)

p + coord_flip() + theme_bw() +
    panel.border = element_blank(), panel.grid.major = element_blank(),
    panel.grid.minor = element_blank(), axis.line = element_line(colour = "black"))

Source link