@@ -23,8 +23,7 @@ var attrs = {
2323 editType : 'calc+clearAxisTypes' ,
2424 description : [
2525 'Sets the x coordinates of the vector field' ,
26- 'If `cones` positions are not provided, this array' ,
27- 'corresponds to the x coordinates of the cones displayed as well.'
26+ 'and of the displayed cones.'
2827 ] . join ( ' ' )
2928 } ,
3029 y : {
@@ -33,8 +32,7 @@ var attrs = {
3332 editType : 'calc+clearAxisTypes' ,
3433 description : [
3534 'Sets the y coordinates of the vector field' ,
36- 'If `cones` positions are not provided, this array' ,
37- 'corresponds to the y coordinates of the cones displayed as well.'
35+ 'and of the displayed cones.'
3836 ] . join ( ' ' )
3937 } ,
4038 z : {
@@ -43,8 +41,7 @@ var attrs = {
4341 editType : 'calc+clearAxisTypes' ,
4442 description : [
4543 'Sets the z coordinates of the vector field' ,
46- 'If `cones` positions are not provided, this array' ,
47- 'corresponds to the z coordinates of the cones displayed as well.'
44+ 'and of the displayed cones.'
4845 ] . join ( ' ' )
4946 } ,
5047
@@ -64,38 +61,49 @@ var attrs = {
6461 description : 'Sets the z components of the vector field.'
6562 } ,
6663
67- cones : {
68- // potential attributes to add:
69- //
70- // - meshmode: 'cartesian-product', 'pts', 'grid'
71- //
72- // under `meshmode: 'grid'`
73- // - (x|y|z)grid.start
74- // - (x|y|z)grid.end
75- // - (x|y|z)grid.size
76-
77- x : {
78- valType : 'data_array' ,
79- editType : 'calc' ,
80- description : 'Sets the x coordinates of the cones to be displayed.'
81- } ,
82- y : {
83- valType : 'data_array' ,
84- editType : 'calc' ,
85- description : 'Sets the y coordinates of the cones to be displayed.'
86- } ,
87- z : {
88- valType : 'data_array' ,
89- editType : 'calc' ,
90- description : 'Sets the z coordinates of the cones to be displayed.'
91- } ,
92-
93- editType : 'calc' ,
94- description : [
95- 'By setting `cones.x`, `cones.y` and `cones.z` to 1D arrays,' ,
96- 'plotly creates a mesh using the cartesian product of those 3 arrays.'
97- ] . join ( ' ' )
98- } ,
64+ // TODO add way to specify cone positions independently of the vector field
65+ // provided, similar to MATLAB's coneplot Cx/Cy/Cz meshgrids,
66+ // see https://www.mathworks.com/help/matlab/ref/coneplot.html
67+ //
68+ // Alternatively, if our goal is only to 'fill in gaps' in the vector data,
69+ // we could try to extend the heatmap 'connectgaps' algorithm to 3D.
70+ // From AJ: this particular algorithm which amounts to a Poisson equation,
71+ // both for interpolation and extrapolation - is the right one to use for
72+ // cones too. It makes a field with zero divergence, which is a good
73+ // baseline assumption for vector fields.
74+ //
75+ // cones: {
76+ // // potential attributes to add:
77+ // //
78+ // // - meshmode: 'cartesian-product', 'pts', 'grid'
79+ // //
80+ // // under `meshmode: 'grid'`
81+ // // - (x|y|z)grid.start
82+ // // - (x|y|z)grid.end
83+ // // - (x|y|z)grid.size
84+ //
85+ // x: {
86+ // valType: 'data_array',
87+ // editType: 'calc',
88+ // description: 'Sets the x coordinates of the cones to be displayed.'
89+ // },
90+ // y: {
91+ // valType: 'data_array',
92+ // editType: 'calc',
93+ // description: 'Sets the y coordinates of the cones to be displayed.'
94+ // },
95+ // z: {
96+ // valType: 'data_array',
97+ // editType: 'calc',
98+ // description: 'Sets the z coordinates of the cones to be displayed.'
99+ // },
100+ //
101+ // editType: 'calc',
102+ // description: [
103+ // 'By setting `cones.x`, `cones.y` and `cones.z` to 1D arrays,',
104+ // 'plotly creates a mesh using the cartesian product of those 3 arrays.'
105+ // ].join(' ')
106+ // },
99107
100108 sizemode : {
101109 valType : 'enumerated' ,
@@ -128,7 +136,7 @@ var attrs = {
128136 dflt : 'cm' ,
129137 description : [
130138 'Sets the cones\' anchor with respect to their x/y/z positions.' ,
131- 'Note that *cm* denote the cone\'s center of mass with corresponds to' ,
139+ 'Note that *cm* denote the cone\'s center of mass which corresponds to' ,
132140 '1/4 from the tail to tip.'
133141 ] . join ( ' ' )
134142 } ,
0 commit comments