title: how to define a static xaxis and y axis, javascript d3
body: <p>the x axis and the y axis depends on the values given in the array every one of them starts from the value min and stop in the value max. Can we change the segmentation to be independent from the user values?</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;style&gt;
  
  body {
  font: 10px sans-serif;
  }
  
  .axis path, .axis line {
  fill: none;
  stroke: #000;
  shape-rendering: crispEdges;
  }
  
  .point {
   fill: steelblue;
  stroke: #000;
  }
  
  &lt;/style&gt;
  &lt;body&gt;
  &lt;script src="http://d3js.org/d3.v2.js?2.9.6"&gt;&lt;/script&gt;
  &lt;script&gt;
  
  var margin = {top: 20, right: 20, bottom: 30, left: 40},
  width = 960 - margin.left - margin.right,
  height = 500 - margin.top - margin.bottom;
  
  var x = d3.scale.linear()
  .range([0, width]);
  
  var y = d3.scale.linear()
  .range([height, 0]);
  
   var svg = d3.select("body").append("svg")
  .attr("width", width + margin.left + margin.right)
  .attr("height", height + margin.top + margin.bottom)
  .append("g")
  .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
  
  d3.csv("data.csv", function(data) {
  
   // Coerce the strings to numbers.
  data.forEach(function(d) {
  d.x = +d.x;
  d.y = +d.y;
  });
  
  // Compute the scales’ domains.
  x.domain(d3.extent(data, function(d) { return d.x; })).nice();
  y.domain(d3.extent(data, function(d) { return d.y; })).nice();
  
  // Add the x-axis.
   svg.append("g")
  .attr("class", "x axis")
   .attr("transform", "translate(0," + height + ")")
   .call(d3.svg.axis().scale(x).orient("bottom"));
  
  // Add the y-axis.
  svg.append("g")
  .attr("class", "y axis")
   .call(d3.svg.axis().scale(y).orient("left"));
  
   // Add the points!
   svg.selectAll(".point")
   .data(data)
   .enter().append("path")
    .attr("class", "point")
    .attr("d", d3.svg.symbol().type("triangle-up"))
    .attr("transform", function(d) { return "translate(" + x(d.x) + "," + y(d.y) + ")"; });
    });
  
   &lt;/script&gt;
  </code></pre>
  
  <p>The file:data.cvs</p>
  
  <pre><code>x,y
  5,90
  25,30
  45,50
  65,55
  85,25
  </code></pre>