Javascript concec.js中Conrec.contour的参数是什么?
我正在尝试用d3.js和conrec.js构建一个等高线图 在Jason的示例代码中,我无法插值Conrec对象的contour()属性的每个参数应该是什么。以下是他的例子: 在一般情况下,c.contour的参数应该是什么还不清楚,因为零和二的语义在这里被重载了Javascript concec.js中Conrec.contour的参数是什么?,javascript,d3.js,data-visualization,contour,Javascript,D3.js,Data Visualization,Contour,我正在尝试用d3.js和conrec.js构建一个等高线图 在Jason的示例代码中,我无法插值Conrec对象的contour()属性的每个参数应该是什么。以下是他的例子: 在一般情况下,c.contour的参数应该是什么还不清楚,因为零和二的语义在这里被重载了 我能得到每个论点的一般描述吗 这里是源代码中的文档: 哎呀!我的错误。在这里发布之前,我应该更仔细地阅读这些文档。 var data = [[0, 1, 0], [1, 2, 1], [0, 1, 0]]; var c = new C
我能得到每个论点的一般描述吗 这里是源代码中的文档:
哎呀!我的错误。在这里发布之前,我应该更仔细地阅读这些文档。
var data = [[0, 1, 0], [1, 2, 1], [0, 1, 0]];
var c = new Conrec;
c.contour(data, 0, 2, 0, 2, [1, 2, 3], [1, 2, 3], 3, [0, 1, 2]);
// c.contours will now contain vectors in the form of doubly-linked lists.
// c.contourList() will return an array of vectors in the form of arrays.
/**
* contour is a contouring subroutine for rectangularily spaced data
*
* It emits calls to a line drawing subroutine supplied by the user which
* draws a contour map corresponding to real*4data on a randomly spaced
* rectangular grid. The coordinates emitted are in the same units given in
* the x() and y() arrays.
*
* Any number of contour levels may be specified but they must be in order of
* increasing value.
*
*
* @param {number[][]} d - matrix of data to contour
* @param {number} ilb,iub,jlb,jub - index bounds of data matrix
*
* The following two, one dimensional arrays (x and y) contain
* the horizontal and vertical coordinates of each sample points.
* @param {number[]} x - data matrix column coordinates
* @param {number[]} y - data matrix row coordinates
* @param {number} nc - number of contour levels
* @param {number[]} z - contour levels in increasing order.
*/
Conrec.prototype.contour = function(d, ilb, iub, jlb, jub, x, y, nc, z) {