Hello,
my code used to work and now I am getting this error which does not display my annotation df <- data.frame("prop" = c(102.73,260.65), "Name" = c("All Genes \n 31385","Glucose Response Genes \n 103")) p <- ggplot(data = df, aes(x = Name, y = prop, fill = Name)) + geom_bar(stat = "identity") + labs(x = "", y = "EQTL / gene") + scale_fill_brewer(palette="Greens",name = "Number of cis EQTL", labels = c("3124345", "26846")) + theme_minimal() + theme(legend.position = "right", panel.grid.major.y = element_blank(), panel.grid.minor.y = element_blank(), axis.line = element_line(), axis.ticks = element_line()) p + annotate("text", x = 1.5, y = 280, label = "p = 0.008", size = 3.5) + annotate("rect", xmin = 1, xmax = 2, ymin = 270, ymax =270, alpha=0.3,colour = "black") I am getting this error: > p + annotate("text", x = 1.5, y = 280, label = "p = 0.008", size = 3.5) + + annotate("rect", xmin = 1, xmax = 2, ymin = 270, ymax =270, alpha=0.3,colour = "black") Error in annotate("text", x = 1.5, y = 280, label = "p = 0.008", size = 3.5) : unused arguments (x = 1.5, y = 280, label = "p = 0.008", size = 3.5) Please advice, Ana ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.