Use plot() instead of barplot() and turn the x values into a vector:
a<-runif(100)
x<-rep(1,times=length(a)) # x & a same length
plot(x,a,type="p") #type = "p" : point
or in ggplot2
require(ggplot2)
a<-runif(100)
x<-rep(1,times=length(a))
qplot(x,a,geom="point")
#OR
ggplot()+geom_point(aes(x,a))