The problem is not within .size(), it’s that you are stating the SVG dimensions in .attr("width", w) .attr("height", h). Remove these two attributes and you’ll get it right…
var svg = d3.select("#viz").append("svg")
.attr("id", "playgraph")
//better to keep the viewBox dimensions with variables
.attr("viewBox", "0 0 " + w + " " + h )
.attr("preserveAspectRatio", "xMidYMid meet");
http://jsfiddle.net/aaSjd/