title: Horizontal Barplot in ggplot2
body: <p>I was working on doing a horizontal dot plot (?) in <code>ggplot2</code>, and it got me thinking about trying to create a horizontal barplot. However, I am finding some limitations in being able to do this.</p>
  
  <p>Here is my data:</p>
  
  <pre><code>df &lt;- data.frame(Seller=c("Ad","Rt","Ra","Mo","Ao","Do"), 
                  Avg_Cost=c(5.30,3.72,2.91,2.64,1.17,1.10), Num=c(6:1))
  df
  str(df)
  </code></pre>
  
  <p>Initially, I generated a dot plot using the following code:</p>
  
  <pre><code>require(ggplot2)
  ggplot(df, aes(x=Avg_Cost, y=reorder(Seller,Num))) + 
      geom_point(colour="black",fill="lightgreen") + 
      opts(title="Avg Cost") +
      ylab("Region") + xlab("") + ylab("") + xlim(c(0,7)) +
      opts(plot.title = theme_text(face = "bold", size=15)) +
      opts(axis.text.y = theme_text(family = "sans", face = "bold", size = 12)) +
      opts(axis.text.x = theme_text(family = "sans", face = "bold", size = 12))
  </code></pre>
  
  <p>However, I am now trying to create a horizontal barplot and finding that I am unable to do so. I've tried <code>coord_flip()</code> and that was not helpful either.</p>
  
  <pre><code>ggplot(df, aes(x=Avg_Cost, y=reorder(Seller,Num))) + 
      geom_bar(colour="black",fill="lightgreen") + 
      opts(title="Avg Cost") +
      ylab("Region") + xlab("") + ylab("") + xlim(c(0,7)) +
      opts(plot.title = theme_text(face = "bold", size=15)) +
      opts(axis.text.y = theme_text(family = "sans", face = "bold", size = 12)) +
      opts(axis.text.x = theme_text(family = "sans", face = "bold", size = 12)) 
  </code></pre>
  
  <p>Can anyone provide some assistance on how to generate a horizontal barplot in <code>ggplot2</code>?</p>