title: Uncaught TypeError: d3.scaleOrdinal is not a function
body: <p>I want to color the dots in a scatterplot according to the domain, but I get the error : <strong>Uncaught TypeError: d3.scaleOrdinal is not a function</strong>   </p>
  
  <pre><code>var colors =  ["#63b598", "#ce7d78", "#ea9e70"];
  var  color = d3.scaleOrdinal().domain(['a','b','c']).range(colors);
  svg.selectAll(".dot")
    .data(data)
  .enter().append("circle")
    .attr("class", "dot")
    .attr("r", 3.5)
    .attr("cx", xMap)
    .attr("cy", yMap)
    .style("fill", function(d){ return color(d.category)})
  </code></pre>