title: D3 Ordinal Scales with Scatter Plot
body: <p>I'm attempting to use D3 to produce a scatter plot where the x-axis is ordinal. You should be able to see a small exmaple of this at : <a href="http://plnkr.co/edit/c7iy6T?p=preview" rel="nofollow">http://plnkr.co/edit/c7iy6T?p=preview</a></p>
  
  <p>My first order question is : How would I shift the "clusters" over so they they are situated on top of the ordinal labels.</p>
  
  <p>My second order question  is : if I had the json </p>
  
  <pre><code>{x : 1.1, y : 1.9  ,label : foo}
  {x :  .9, y : 2.2  ,label : foo}
  {x : 2.1, y : 1.2  ,label : bar}
  {x : 1.9, y : 5.3  ,label : bar}
  </code></pre>
  
  <p>What would be the most idiomatic way to have that displayed in scatterplot so that the labels would essentially be situated over the integer values 1,2 while the data is plotted as one would with a linear scale scatterplot.</p>
  
  <p>Edit: </p>
  
  <p>My second question concerns the following. I can have M clusters, for cluster m i know that the x coordinate will be "centered" around the integer m. Like above all all the foo values were closer to 1 than any other integer. I want to be able to pass in a structure like above. And have the output be a typical x-y plot but where the integer ticks have been suppressed and only the labels appear. </p>
  
  <p>Lars, answer below does center my values, but it also seems to ignore any other scale and compress the x-values into what appears to be a line. This is visible at : <a href="http://plnkr.co/edit/ncANkH?p=preview" rel="nofollow">http://plnkr.co/edit/ncANkH?p=preview</a>. Lars solution would be ideal but for the compression problem.</p>