You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
introduce new box attributes for q1/median/q3 signature
- add attribues q1, median, q3, lowerfence, upperfence,
notchspan, mean, sd, dx, dy
- add info in the module meta description
- add info about improved boxmean, boxpoints and notched dflt logic
- add TODO comment for potential outlier bounds attributes
Copy file name to clipboardExpand all lines: src/traces/box/attributes.js
+128-7Lines changed: 128 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -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,11 +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
},
55
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
+
56
79
name: {
57
80
valType: 'string',
58
81
role: 'info',
@@ -66,6 +89,58 @@ module.exports = {
66
89
].join(' ')
67
90
},
68
91
92
+
q1: {
93
+
valType: 'data_array',
94
+
role: 'info',
95
+
editType: 'calc+clearAxisTypes',
96
+
description: [
97
+
'Sets the Quartile 1 values,',
98
+
'There should be as many items as the number of boxes desired.',
99
+
].join(' ')
100
+
},
101
+
median: {
102
+
valType: 'data_array',
103
+
role: 'info',
104
+
editType: 'calc+clearAxisTypes',
105
+
description: [
106
+
'Sets the median values.',
107
+
'There should be as many items as the number of boxes desired.',
108
+
].join(' ')
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',
122
+
editType: 'calc',
123
+
description: [
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.'
141
+
].join(' ')
142
+
},
143
+
69
144
notched: {
70
145
valType: 'boolean',
71
146
role: 'info',
@@ -76,7 +151,8 @@ module.exports = {
76
151
'We compute the confidence interval as median +/- 1.57 * IQR / sqrt(N),',
77
152
'where IQR is the interquartile range and N is the sample size.',
78
153
'If two boxes\' notches do not overlap there is 95% confidence their medians differ.',
79
-
'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.'
80
156
].join(' ')
81
157
},
82
158
notchwidth: {
@@ -92,6 +168,24 @@ module.exports = {
92
168
'For example, with 0, the notches are as wide as the box(es).'
93
169
].join(' ')
94
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,',
0 commit comments