@@ -39,7 +39,9 @@ module.exports = {
39
39
role : 'info' ,
40
40
editType : 'calc+clearAxisTypes' ,
41
41
description : [
42
- 'Sets the x coordinate of the box.' ,
42
+ 'Sets the x coordinate for single-box traces' ,
43
+ 'or the starting coordinate for multi-box traces' ,
44
+ 'set using q1/median/q3.' ,
43
45
'See overview for more info.'
44
46
] . join ( ' ' )
45
47
} ,
@@ -48,10 +50,32 @@ module.exports = {
48
50
role : 'info' ,
49
51
editType : 'calc+clearAxisTypes' ,
50
52
description : [
51
- 'Sets the y coordinate of the box.' ,
53
+ 'Sets the y coordinate for single-box traces' ,
54
+ 'or the starting coordinate for multi-box traces' ,
55
+ 'set using q1/median/q3.' ,
52
56
'See overview for more info.'
53
57
] . join ( ' ' )
54
58
} ,
59
+
60
+ dx : {
61
+ valType : 'number' ,
62
+ role : 'info' ,
63
+ editType : 'calc' ,
64
+ description : [
65
+ 'Sets the x coordinate step for multi-box traces' ,
66
+ 'set using q1/median/q3.'
67
+ ] . join ( ' ' )
68
+ } ,
69
+ dy : {
70
+ valType : 'number' ,
71
+ role : 'info' ,
72
+ editType : 'calc' ,
73
+ description : [
74
+ 'Sets the y coordinate step for multi-box traces' ,
75
+ 'set using q1/median/q3.'
76
+ ] . join ( ' ' )
77
+ } ,
78
+
55
79
name : {
56
80
valType : 'string' ,
57
81
role : 'info' ,
@@ -64,48 +88,71 @@ module.exports = {
64
88
'missing and the position axis is categorical'
65
89
] . join ( ' ' )
66
90
} ,
67
- text : extendFlat ( { } , scatterAttrs . text , {
91
+
92
+ q1 : {
93
+ valType : 'data_array' ,
94
+ role : 'info' ,
95
+ editType : 'calc+clearAxisTypes' ,
68
96
description : [
69
- 'Sets the text elements associated with each sample value.' ,
70
- 'If a single string, the same string appears over' ,
71
- 'all the data points.' ,
72
- 'If an array of string, the items are mapped in order to the' ,
73
- 'this trace\'s (x,y) coordinates.' ,
74
- 'To be seen, trace `hoverinfo` must contain a *text* flag.'
97
+ 'Sets the Quartile 1 values.' ,
98
+ 'There should be as many items as the number of boxes desired.' ,
75
99
] . join ( ' ' )
76
- } ) ,
77
- hovertext : extendFlat ( { } , scatterAttrs . hovertext , {
78
- description : 'Same as `text`.'
79
- } ) ,
80
- hovertemplate : hovertemplateAttrs ( {
100
+ } ,
101
+ median : {
102
+ valType : 'data_array' ,
103
+ role : 'info' ,
104
+ editType : 'calc+clearAxisTypes' ,
81
105
description : [
82
- 'N.B. This only has an effect when hovering on points.'
106
+ 'Sets the median values.' ,
107
+ 'There should be as many items as the number of boxes desired.' ,
83
108
] . join ( ' ' )
84
- } ) ,
85
- whiskerwidth : {
86
- valType : 'number' ,
87
- min : 0 ,
88
- max : 1 ,
89
- dflt : 0.5 ,
90
- role : 'style' ,
109
+ } ,
110
+ q3 : {
111
+ valType : 'data_array' ,
112
+ role : 'info' ,
113
+ editType : 'calc+clearAxisTypes' ,
114
+ description : [
115
+ 'Sets the Quartile 3 values.' ,
116
+ 'There should be as many items as the number of boxes desired.' ,
117
+ ] . join ( ' ' )
118
+ } ,
119
+ lowerfence : {
120
+ valType : 'data_array' ,
121
+ role : 'info' ,
91
122
editType : 'calc' ,
92
123
description : [
93
- 'Sets the width of the whiskers relative to' ,
94
- 'the box\' width.' ,
95
- 'For example, with 1, the whiskers are as wide as the box(es).'
124
+ 'Sets the lower fence values.' ,
125
+ 'There should be as many items as the number of boxes desired.' ,
126
+ 'This attribute has effect only under the q1/median/q3 signature.' ,
127
+ 'If `lowerfence` is not provided but a sample (in `y` or `x`) is set,' ,
128
+ 'we compute the lower as the last sample point below 1.5 times the IQR.'
129
+ ] . join ( ' ' )
130
+ } ,
131
+ upperfence : {
132
+ valType : 'data_array' ,
133
+ role : 'info' ,
134
+ editType : 'calc' ,
135
+ description : [
136
+ 'Sets the upper fence values.' ,
137
+ 'There should be as many items as the number of boxes desired.' ,
138
+ 'This attribute has effect only under the q1/median/q3 signature.' ,
139
+ 'If `upperfence` is not provided but a sample (in `y` or `x`) is set,' ,
140
+ 'we compute the lower as the last sample point above 1.5 times the IQR.'
96
141
] . join ( ' ' )
97
142
} ,
143
+
98
144
notched : {
99
145
valType : 'boolean' ,
100
- role : 'style ' ,
146
+ role : 'info ' ,
101
147
editType : 'calc' ,
102
148
description : [
103
149
'Determines whether or not notches are drawn.' ,
104
150
'Notches displays a confidence interval around the median.' ,
105
- 'We compute the confidence interval as median +/- 1.57 / IQR * sqrt(N),' ,
151
+ 'We compute the confidence interval as median +/- 1.57 * IQR / sqrt(N),' ,
106
152
'where IQR is the interquartile range and N is the sample size.' ,
107
153
'If two boxes\' notches do not overlap there is 95% confidence their medians differ.' ,
108
- 'See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info.'
154
+ 'See https://sites.google.com/site/davidsstatistics/home/notched-box-plots for more info.' ,
155
+ 'Defaults to *false* unless `notchwidth` or `notchspan` is set.'
109
156
] . join ( ' ' )
110
157
} ,
111
158
notchwidth : {
@@ -121,10 +168,28 @@ module.exports = {
121
168
'For example, with 0, the notches are as wide as the box(es).'
122
169
] . join ( ' ' )
123
170
} ,
171
+ notchspan : {
172
+ valType : 'data_array' ,
173
+ role : 'info' ,
174
+ editType : 'calc' ,
175
+ description : [
176
+ 'Sets the notch span from the boxes\' `median` values.' ,
177
+ 'There should be as many items as the number of boxes desired.' ,
178
+ 'This attribute has effect only under the q1/median/q3 signature.' ,
179
+ 'If `notchspan` is not provided but a sample (in `y` or `x`) is set,' ,
180
+ 'we compute it as 1.57 * IQR / sqrt(N),' ,
181
+ 'where N is the sample size.'
182
+ ] . join ( ' ' )
183
+ } ,
184
+
185
+ // TODO
186
+ // maybe add
187
+ // - loweroutlierbound / upperoutlierbound
188
+ // - lowersuspectedoutlierbound / uppersuspectedoutlierbound
189
+
124
190
boxpoints : {
125
191
valType : 'enumerated' ,
126
192
values : [ 'all' , 'outliers' , 'suspectedoutliers' , false ] ,
127
- dflt : 'outliers' ,
128
193
role : 'style' ,
129
194
editType : 'calc' ,
130
195
description : [
@@ -134,19 +199,11 @@ module.exports = {
134
199
'points either less than 4*Q1-3*Q3 or greater than 4*Q3-3*Q1' ,
135
200
'are highlighted (see `outliercolor`)' ,
136
201
'If *all*, all sample points are shown' ,
137
- 'If *false*, only the box(es) are shown with no sample points'
138
- ] . join ( ' ' )
139
- } ,
140
- boxmean : {
141
- valType : 'enumerated' ,
142
- values : [ true , 'sd' , false ] ,
143
- dflt : false ,
144
- role : 'style' ,
145
- editType : 'calc' ,
146
- description : [
147
- 'If *true*, the mean of the box(es)\' underlying distribution is' ,
148
- 'drawn as a dashed line inside the box(es).' ,
149
- 'If *sd* the standard deviation is also drawn.'
202
+ 'If *false*, only the box(es) are shown with no sample points' ,
203
+ 'Defaults to *suspectedoutliers* when `marker.outliercolor` or' ,
204
+ '`marker.line.outliercolor` is set.' ,
205
+ 'Defaults to *all* under the q1/median/q3 signature.' ,
206
+ 'Otherwise defaults to *outliers*.' ,
150
207
] . join ( ' ' )
151
208
} ,
152
209
jitter : {
@@ -175,6 +232,46 @@ module.exports = {
175
232
'right (left) for vertical boxes and above (below) for horizontal boxes'
176
233
] . join ( ' ' )
177
234
} ,
235
+
236
+ boxmean : {
237
+ valType : 'enumerated' ,
238
+ values : [ true , 'sd' , false ] ,
239
+ role : 'style' ,
240
+ editType : 'calc' ,
241
+ description : [
242
+ 'If *true*, the mean of the box(es)\' underlying distribution is' ,
243
+ 'drawn as a dashed line inside the box(es).' ,
244
+ 'If *sd* the standard deviation is also drawn.' ,
245
+ 'Defaults to *true* when `mean` is set.' ,
246
+ 'Defaults to *sd* when `sd` is set' ,
247
+ 'Otherwise defaults to *false*.'
248
+ ] . join ( ' ' )
249
+ } ,
250
+ mean : {
251
+ valType : 'data_array' ,
252
+ role : 'info' ,
253
+ editType : 'calc' ,
254
+ description : [
255
+ 'Sets the mean values.' ,
256
+ 'There should be as many items as the number of boxes desired.' ,
257
+ 'This attribute has effect only under the q1/median/q3 signature.' ,
258
+ 'If `mean` is not provided but a sample (in `y` or `x`) is set,' ,
259
+ 'we compute the mean for each box using the sample values.'
260
+ ] . join ( ' ' )
261
+ } ,
262
+ sd : {
263
+ valType : 'data_array' ,
264
+ role : 'info' ,
265
+ editType : 'calc' ,
266
+ description : [
267
+ 'Sets the standard deviation values.' ,
268
+ 'There should be as many items as the number of boxes desired.' ,
269
+ 'This attribute has effect only under the q1/median/q3 signature.' ,
270
+ 'If `sd` is not provided but a sample (in `y` or `x`) is set,' ,
271
+ 'we compute the standard deviation for each box using the sample values.'
272
+ ] . join ( ' ' )
273
+ } ,
274
+
178
275
orientation : {
179
276
valType : 'enumerated' ,
180
277
values : [ 'v' , 'h' ] ,
@@ -187,6 +284,30 @@ module.exports = {
187
284
] . join ( ' ' )
188
285
} ,
189
286
287
+ quartilemethod : {
288
+ valType : 'enumerated' ,
289
+ values : [ 'linear' , 'exclusive' , 'inclusive' ] ,
290
+ dflt : 'linear' ,
291
+ role : 'info' ,
292
+ editType : 'calc' ,
293
+ description : [
294
+ 'Sets the method used to compute the sample\'s Q1 and Q3 quartiles.' ,
295
+
296
+ 'The *linear* method uses the 25th percentile for Q1 and 75th percentile for Q3' ,
297
+ 'as computed using method #10 (listed on http://www.amstat.org/publications/jse/v14n3/langford.html).' ,
298
+
299
+ 'The *exclusive* method uses the median to divide the ordered dataset into two halves' ,
300
+ 'if the sample is odd, it does not include the median in either half -' ,
301
+ 'Q1 is then the median of the lower half and' ,
302
+ 'Q3 the median of the upper half.' ,
303
+
304
+ 'The *inclusive* method also uses the median to divide the ordered dataset into two halves' ,
305
+ 'but if the sample is odd, it includes the median in both halves -' ,
306
+ 'Q1 is then the median of the lower half and' ,
307
+ 'Q3 the median of the upper half.'
308
+ ] . join ( ' ' )
309
+ } ,
310
+
190
311
width : {
191
312
valType : 'number' ,
192
313
min : 0 ,
@@ -246,6 +367,7 @@ module.exports = {
246
367
} ,
247
368
editType : 'plot'
248
369
} ,
370
+
249
371
line : {
250
372
color : {
251
373
valType : 'color' ,
@@ -263,8 +385,23 @@ module.exports = {
263
385
} ,
264
386
editType : 'plot'
265
387
} ,
388
+
266
389
fillcolor : scatterAttrs . fillcolor ,
267
390
391
+ whiskerwidth : {
392
+ valType : 'number' ,
393
+ min : 0 ,
394
+ max : 1 ,
395
+ dflt : 0.5 ,
396
+ role : 'style' ,
397
+ editType : 'calc' ,
398
+ description : [
399
+ 'Sets the width of the whiskers relative to' ,
400
+ 'the box\' width.' ,
401
+ 'For example, with 1, the whiskers are as wide as the box(es).'
402
+ ] . join ( ' ' )
403
+ } ,
404
+
268
405
offsetgroup : barAttrs . offsetgroup ,
269
406
alignmentgroup : barAttrs . alignmentgroup ,
270
407
@@ -276,6 +413,26 @@ module.exports = {
276
413
marker : scatterAttrs . unselected . marker ,
277
414
editType : 'style'
278
415
} ,
416
+
417
+ text : extendFlat ( { } , scatterAttrs . text , {
418
+ description : [
419
+ 'Sets the text elements associated with each sample value.' ,
420
+ 'If a single string, the same string appears over' ,
421
+ 'all the data points.' ,
422
+ 'If an array of string, the items are mapped in order to the' ,
423
+ 'this trace\'s (x,y) coordinates.' ,
424
+ 'To be seen, trace `hoverinfo` must contain a *text* flag.'
425
+ ] . join ( ' ' )
426
+ } ) ,
427
+ hovertext : extendFlat ( { } , scatterAttrs . hovertext , {
428
+ description : 'Same as `text`.'
429
+ } ) ,
430
+ hovertemplate : hovertemplateAttrs ( {
431
+ description : [
432
+ 'N.B. This only has an effect when hovering on points.'
433
+ ] . join ( ' ' )
434
+ } ) ,
435
+
279
436
hoveron : {
280
437
valType : 'flaglist' ,
281
438
flags : [ 'boxes' , 'points' ] ,
0 commit comments