My data is a single column like this:
Number Assigned Row
1 1
2 1
3 2
4 1
5 2
6 3
... ...
When I plot using barplot I get what I want:

However when I use ggplot + geom_bar I get this:

This is my code for ggplot:
count <- data.frame(alldata[[xaxis]])
ggplot(data=count, aes(x="My X Axis", y="My Y Axis")) +
geom_bar(stat="identity")
versus the code I use for barplot:
counts <- table(alldata[[xaxis]])
barplot(counts,
main = xaxis,
xlab = "Percentile",
cex.names = 0.8,
col=c("darkblue","red"), beside = group != "NA")

"around your x and y variable names. I meant quotes - my bad - morgan121