title: How do I tell d3 to not repeat values in ticks?
body: <p>I made a histogram / bar graph. I read in my frequency data as integers and set up my y-axis like this:</p>
  
  <pre><code>var yScale = d3.scale.linear().range([300, 0]).domain([0, 2]);
  var yAxis = d3.svg.axis().scale(yScale).orient(‘left’)
          .tickFormat(d3.format(,.0f));
  </code></pre>
  
  <p>Unfortunately, the y axis repeats each frequency several times as shown here:</p>
  
  <p><img src="https://i.stack.imgur.com/EhWT3.png" alt="enter image description here"></p>
  
  <p>How do I tell d3 to stop repeating y-values on the y-axis? I don’t want to use <code>.ticks(someNumber)</code> since I want to keep the number of ticks itself flexible.</p>