These are my simple data (table.all):
YR count
2001 8
2002 25
2003 24
2004 26
2005 34
2006 37
2007 61
2008 46
2009 49
2010 54
2011 35
I want to plot the count, both with barplot, and ggplot, but this barplot code fails to plot the years as x-axis labels:
barplot((table.all$count),axes=T,ylim=c(0,80),
cex.names=0.8,las=2,
main=paste("Number of peer-reviewed papers"))
And this ggplot code fails to show me anything at all, which is weird since I have reused some code I've already used and that has worked on other data:
ggplot(table.all, aes(x=YR,y=count)) + ylim(0,80) + xlim(2000,2016)
scale_y_continuous(expand = c(0, 0)) +
geom_bar(stat='identity') +
theme_bw(base_size = 16,base_family = "Times") +
annotate("text",x=2.5,y=14.9,
label="Total number of peer-reviewed papers",cex=7)