title: plotting a quantitative variable against a list of strings in R
body: <p>I have the following data I would like to plot:</p>
  <pre><code>&gt; x=c(&quot;X11&quot;, &quot;X13&quot;, &quot;X16&quot;, &quot;X17&quot;)
  &gt; y=c(0.8, .9, .87, .84)
  &gt; foo=data.frame(x, y)
  &gt; foo
      x    y
  1 X11 0.80
  2 X13 0.90
  3 X16 0.87
  4 X17 0.84
  </code></pre>
  <p>I would like to get a plot where on the x axis I have the labels in the x column, and on the y axis I have the values in the y column. However, I get this:</p>
  <p><a href="https://i.stack.imgur.com/KEfna.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KEfna.png" alt="bad plot" /></a></p>
  <p>which is basically a box-plot in which I have only one observation for category. This won't do - for starters, I cannot change the plotting symbols, because they're not actually symbols, but degenerate boxes. If I change my data structure and go to named vectors, i.e.,</p>
  <pre><code> &gt; names(y)=x
   &gt; y
    X11  X13  X16  X17 
    0.80 0.90 0.87 0.84 
   &gt; plot(y)
  </code></pre>
  <p>I get this</p>
  <p><a href="https://i.stack.imgur.com/uLWJZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uLWJZ.png" alt="another bad plot" /></a></p>
  <p>where I'm now free to change the plot symbols, lines, colors, etc., but I cannot get the label names on the x axis. Aaargh!! It's so much easier in <code>matlab</code> or <code>python</code>, why must it be such a drag in <code>R</code>?</p>