It looks like you are using the wrong selector while updating the axes:
svg.selectAll("g .y.axis")
.call(yAxis);
svg.selectAll("g .x.axis")
.call(xAxis);
maybe should read:
svg.selectAll("g.y.axis")
.call(yAxis);
svg.selectAll("g.x.axis")
.call(xAxis);