@@ -23,8 +23,7 @@ var attrs = {
23
23
editType : 'calc+clearAxisTypes' ,
24
24
description : [
25
25
'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.'
28
27
] . join ( ' ' )
29
28
} ,
30
29
y : {
@@ -33,8 +32,7 @@ var attrs = {
33
32
editType : 'calc+clearAxisTypes' ,
34
33
description : [
35
34
'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.'
38
36
] . join ( ' ' )
39
37
} ,
40
38
z : {
@@ -43,8 +41,7 @@ var attrs = {
43
41
editType : 'calc+clearAxisTypes' ,
44
42
description : [
45
43
'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.'
48
45
] . join ( ' ' )
49
46
} ,
50
47
@@ -64,38 +61,49 @@ var attrs = {
64
61
description : 'Sets the z components of the vector field.'
65
62
} ,
66
63
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
+ // },
99
107
100
108
sizemode : {
101
109
valType : 'enumerated' ,
@@ -128,7 +136,7 @@ var attrs = {
128
136
dflt : 'cm' ,
129
137
description : [
130
138
'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' ,
132
140
'1/4 from the tail to tip.'
133
141
] . join ( ' ' )
134
142
} ,
0 commit comments