Still have not figured out why the x and y axis are being switched and then the shape scaled.
I suspect the problem is happening in contours.js at line 26/27:
x = d3.scale.linear().range([0, width]).domain([data.length, 0]),
y = d3.scale.linear().range([height, 0]).domain([data[0].length, 0]),
I have tried every possible combinations of switching [width, 0]
to [0, width]
and such, but nothing has done it.
I wonder if the problem might come from the way the data is structured. The example I used and copied the code from is here: https://github.com/jasondavies/conrec.js/tree/master/example
See the data.js file and compare to the blobMap
array to determine if there is indeed data formatting issues.