-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplotly.graph_objects.Box.html
More file actions
478 lines (446 loc) · 40.5 KB
/
plotly.graph_objects.Box.html
File metadata and controls
478 lines (446 loc) · 40.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>plotly.graph_objects.Box — 4.6.0 documentation</title>
<link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/plotly-style.css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="plotly.graph_objects.Violin" href="plotly.graph_objects.Violin.html" />
<link rel="prev" title="plotly.graph_objects.Table" href="plotly.graph_objects.Table.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
<script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js "></script>
<script type="text/javascript" src="../_static/js/jquery-fix.js "></script>
<script type="text/javascript" src="../_static/bootstrap-3.3.7/js/bootstrap.min.js "></script>
<script type="text/javascript" src="../_static/bootstrap-sphinx.js "></script>
</head><body>
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html"><span><img src="../_static/logo.png"></span>
</a>
<span class="navbar-text navbar-version pull-left"><b></b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li class="dropdown globaltoc-container">
<a role="button"
id="dLabelGlobalToc"
data-toggle="dropdown"
data-target="#"
href="../index.html">Site <b class="caret"></b></a>
<ul class="dropdown-menu globaltoc"
role="menu"
aria-labelledby="dLabelGlobalToc"><ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../plotly.express.html"><code class="docutils literal notranslate"><span class="pre">plotly.express</span></code>: high-level interface for data visualization</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../plotly.graph_objects.html"><code class="docutils literal notranslate"><span class="pre">plotly.graph_objects</span></code>: low-level interface to figures, traces and layout</a></li>
<li class="toctree-l1"><a class="reference internal" href="../plotly.subplots.html"><code class="docutils literal notranslate"><span class="pre">plotly.subplots</span></code>: helper function for laying out multi-plot figures</a></li>
<li class="toctree-l1"><a class="reference internal" href="../plotly.figure_factory.html"><code class="docutils literal notranslate"><span class="pre">plotly.figure_factory</span></code>: helper methods for building specific complex charts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../plotly.io.html"><code class="docutils literal notranslate"><span class="pre">plotly.io</span></code>: low-level interface for displaying, reading and writing figures</a></li>
</ul>
</ul>
</li>
<li class="dropdown">
<a role="button"
id="dLabelLocalToc"
data-toggle="dropdown"
data-target="#"
href="#">Page <b class="caret"></b></a>
<ul class="dropdown-menu localtoc"
role="menu"
aria-labelledby="dLabelLocalToc"><ul>
<li><a class="reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">plotly.graph_objects</span></code>.Box</a></li>
<li><a class="reference internal" href="#id1"><code class="xref py py-mod docutils literal notranslate"><span class="pre">plotly.graph_objects</span></code>.box</a></li>
</ul>
</ul>
</li>
<li>
<a href="plotly.graph_objects.Table.html" title="Previous Chapter: plotly.graph_objects.Table"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« plotly.graph_...</span>
</a>
</li>
<li>
<a href="plotly.graph_objects.Violin.html" title="Next Chapter: plotly.graph_objects.Violin"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">plotly.graph_... »</span>
</a>
</li>
</ul>
<form class="navbar-form navbar-right" action="../search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="body col-md-12 content" role="main">
<div class="section" id="plotly-graph-objs-box">
<h1><a class="reference internal" href="plotly.graph_objects.html#module-plotly.graph_objects" title="plotly.graph_objects"><code class="xref py py-mod docutils literal notranslate"><span class="pre">plotly.graph_objects</span></code></a>.Box<a class="headerlink" href="#plotly-graph-objs-box" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="plotly.graph_objects.Box">
<em class="property">class </em><code class="sig-prename descclassname">plotly.graph_objects.</code><code class="sig-name descname">Box</code><span class="sig-paren">(</span><em class="sig-param">arg=None</em>, <em class="sig-param">alignmentgroup=None</em>, <em class="sig-param">boxmean=None</em>, <em class="sig-param">boxpoints=None</em>, <em class="sig-param">customdata=None</em>, <em class="sig-param">customdatasrc=None</em>, <em class="sig-param">dx=None</em>, <em class="sig-param">dy=None</em>, <em class="sig-param">fillcolor=None</em>, <em class="sig-param">hoverinfo=None</em>, <em class="sig-param">hoverinfosrc=None</em>, <em class="sig-param">hoverlabel=None</em>, <em class="sig-param">hoveron=None</em>, <em class="sig-param">hovertemplate=None</em>, <em class="sig-param">hovertemplatesrc=None</em>, <em class="sig-param">hovertext=None</em>, <em class="sig-param">hovertextsrc=None</em>, <em class="sig-param">ids=None</em>, <em class="sig-param">idssrc=None</em>, <em class="sig-param">jitter=None</em>, <em class="sig-param">legendgroup=None</em>, <em class="sig-param">line=None</em>, <em class="sig-param">lowerfence=None</em>, <em class="sig-param">lowerfencesrc=None</em>, <em class="sig-param">marker=None</em>, <em class="sig-param">mean=None</em>, <em class="sig-param">meansrc=None</em>, <em class="sig-param">median=None</em>, <em class="sig-param">mediansrc=None</em>, <em class="sig-param">meta=None</em>, <em class="sig-param">metasrc=None</em>, <em class="sig-param">name=None</em>, <em class="sig-param">notched=None</em>, <em class="sig-param">notchspan=None</em>, <em class="sig-param">notchspansrc=None</em>, <em class="sig-param">notchwidth=None</em>, <em class="sig-param">offsetgroup=None</em>, <em class="sig-param">opacity=None</em>, <em class="sig-param">orientation=None</em>, <em class="sig-param">pointpos=None</em>, <em class="sig-param">q1=None</em>, <em class="sig-param">q1src=None</em>, <em class="sig-param">q3=None</em>, <em class="sig-param">q3src=None</em>, <em class="sig-param">quartilemethod=None</em>, <em class="sig-param">sd=None</em>, <em class="sig-param">sdsrc=None</em>, <em class="sig-param">selected=None</em>, <em class="sig-param">selectedpoints=None</em>, <em class="sig-param">showlegend=None</em>, <em class="sig-param">stream=None</em>, <em class="sig-param">text=None</em>, <em class="sig-param">textsrc=None</em>, <em class="sig-param">uid=None</em>, <em class="sig-param">uirevision=None</em>, <em class="sig-param">unselected=None</em>, <em class="sig-param">upperfence=None</em>, <em class="sig-param">upperfencesrc=None</em>, <em class="sig-param">visible=None</em>, <em class="sig-param">whiskerwidth=None</em>, <em class="sig-param">width=None</em>, <em class="sig-param">x=None</em>, <em class="sig-param">x0=None</em>, <em class="sig-param">xaxis=None</em>, <em class="sig-param">xcalendar=None</em>, <em class="sig-param">xsrc=None</em>, <em class="sig-param">y=None</em>, <em class="sig-param">y0=None</em>, <em class="sig-param">yaxis=None</em>, <em class="sig-param">ycalendar=None</em>, <em class="sig-param">ysrc=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#plotly.graph_objects.Box" title="Permalink to this definition">¶</a></dt>
<dd><dl class="method">
<dt id="plotly.graph_objects.Box.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">arg=None</em>, <em class="sig-param">alignmentgroup=None</em>, <em class="sig-param">boxmean=None</em>, <em class="sig-param">boxpoints=None</em>, <em class="sig-param">customdata=None</em>, <em class="sig-param">customdatasrc=None</em>, <em class="sig-param">dx=None</em>, <em class="sig-param">dy=None</em>, <em class="sig-param">fillcolor=None</em>, <em class="sig-param">hoverinfo=None</em>, <em class="sig-param">hoverinfosrc=None</em>, <em class="sig-param">hoverlabel=None</em>, <em class="sig-param">hoveron=None</em>, <em class="sig-param">hovertemplate=None</em>, <em class="sig-param">hovertemplatesrc=None</em>, <em class="sig-param">hovertext=None</em>, <em class="sig-param">hovertextsrc=None</em>, <em class="sig-param">ids=None</em>, <em class="sig-param">idssrc=None</em>, <em class="sig-param">jitter=None</em>, <em class="sig-param">legendgroup=None</em>, <em class="sig-param">line=None</em>, <em class="sig-param">lowerfence=None</em>, <em class="sig-param">lowerfencesrc=None</em>, <em class="sig-param">marker=None</em>, <em class="sig-param">mean=None</em>, <em class="sig-param">meansrc=None</em>, <em class="sig-param">median=None</em>, <em class="sig-param">mediansrc=None</em>, <em class="sig-param">meta=None</em>, <em class="sig-param">metasrc=None</em>, <em class="sig-param">name=None</em>, <em class="sig-param">notched=None</em>, <em class="sig-param">notchspan=None</em>, <em class="sig-param">notchspansrc=None</em>, <em class="sig-param">notchwidth=None</em>, <em class="sig-param">offsetgroup=None</em>, <em class="sig-param">opacity=None</em>, <em class="sig-param">orientation=None</em>, <em class="sig-param">pointpos=None</em>, <em class="sig-param">q1=None</em>, <em class="sig-param">q1src=None</em>, <em class="sig-param">q3=None</em>, <em class="sig-param">q3src=None</em>, <em class="sig-param">quartilemethod=None</em>, <em class="sig-param">sd=None</em>, <em class="sig-param">sdsrc=None</em>, <em class="sig-param">selected=None</em>, <em class="sig-param">selectedpoints=None</em>, <em class="sig-param">showlegend=None</em>, <em class="sig-param">stream=None</em>, <em class="sig-param">text=None</em>, <em class="sig-param">textsrc=None</em>, <em class="sig-param">uid=None</em>, <em class="sig-param">uirevision=None</em>, <em class="sig-param">unselected=None</em>, <em class="sig-param">upperfence=None</em>, <em class="sig-param">upperfencesrc=None</em>, <em class="sig-param">visible=None</em>, <em class="sig-param">whiskerwidth=None</em>, <em class="sig-param">width=None</em>, <em class="sig-param">x=None</em>, <em class="sig-param">x0=None</em>, <em class="sig-param">xaxis=None</em>, <em class="sig-param">xcalendar=None</em>, <em class="sig-param">xsrc=None</em>, <em class="sig-param">y=None</em>, <em class="sig-param">y0=None</em>, <em class="sig-param">yaxis=None</em>, <em class="sig-param">ycalendar=None</em>, <em class="sig-param">ysrc=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#plotly.graph_objects.Box.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Construct a new Box object</p>
<p>Each box spans from quartile 1 (Q1) to quartile 3 (Q3). The
second quartile (Q2, i.e. the median) is marked by a line
inside the box. The fences grow outward from the boxes’ edges,
by default they span +/- 1.5 times the interquartile range
(IQR: Q3-Q1), The sample mean and standard deviation as well as
notches and the sample, outlier and suspected outliers points
can be optionally added to the box plot. The values and
positions corresponding to each boxes can be input using two
signatures. The first signature expects users to supply the
sample values in the <code class="docutils literal notranslate"><span class="pre">y</span></code> data array for vertical boxes (<code class="docutils literal notranslate"><span class="pre">x</span></code> for
horizontal boxes). By supplying an <code class="docutils literal notranslate"><span class="pre">x</span></code> (<code class="docutils literal notranslate"><span class="pre">y</span></code>) array, one box per
distinct <code class="docutils literal notranslate"><span class="pre">x</span></code> (<code class="docutils literal notranslate"><span class="pre">y</span></code>) value is drawn If no <code class="docutils literal notranslate"><span class="pre">x</span></code> (<code class="docutils literal notranslate"><span class="pre">y</span></code>) list is
provided, a single box is drawn. In this case, the box is
positioned with the trace <code class="docutils literal notranslate"><span class="pre">name</span></code> or with <code class="docutils literal notranslate"><span class="pre">x0</span></code> (<code class="docutils literal notranslate"><span class="pre">y0</span></code>) if
provided. The second signature expects users to supply the
boxes corresponding Q1, median and Q3 statistics in the <code class="docutils literal notranslate"><span class="pre">q1</span></code>,
<code class="docutils literal notranslate"><span class="pre">median</span></code> and <code class="docutils literal notranslate"><span class="pre">q3</span></code> data arrays respectively. Other box features
relying on statistics namely <code class="docutils literal notranslate"><span class="pre">lowerfence</span></code>, <code class="docutils literal notranslate"><span class="pre">upperfence</span></code>,
<code class="docutils literal notranslate"><span class="pre">notchspan</span></code> can be set directly by the users. To have plotly
compute them or to show sample points besides the boxes, users
can set the <code class="docutils literal notranslate"><span class="pre">y</span></code> data array for vertical boxes (<code class="docutils literal notranslate"><span class="pre">x</span></code> for
horizontal boxes) to a 2D array with the outer length
corresponding to the number of boxes in the traces and the
inner length corresponding the sample size.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>arg</strong> – dict of properties compatible with this constructor or
an instance of <a class="reference internal" href="#plotly.graph_objects.Box" title="plotly.graph_objects.Box"><code class="xref py py-class docutils literal notranslate"><span class="pre">plotly.graph_objects.Box</span></code></a></p></li>
<li><p><strong>alignmentgroup</strong> – Set several traces linked to the same position axis or
matching axes to the same alignmentgroup. This controls
whether bars compute their positional range dependently
or independently.</p></li>
<li><p><strong>boxmean</strong> – If True, the mean of the box(es)’ underlying
distribution is drawn as a dashed line inside the
box(es). If “sd” the standard deviation is also drawn.
Defaults to True when <code class="docutils literal notranslate"><span class="pre">mean</span></code> is set. Defaults to “sd”
when <code class="docutils literal notranslate"><span class="pre">sd</span></code> is set Otherwise defaults to False.</p></li>
<li><p><strong>boxpoints</strong> – If “outliers”, only the sample points lying outside the
whiskers are shown If “suspectedoutliers”, the outlier
points are shown and points either less than 4*Q1-3*Q3
or greater than 4*Q3-3*Q1 are highlighted (see
<code class="docutils literal notranslate"><span class="pre">outliercolor</span></code>) If “all”, all sample points are shown
If False, only the box(es) are shown with no sample
points Defaults to “suspectedoutliers” when
<code class="docutils literal notranslate"><span class="pre">marker.outliercolor</span></code> or <code class="docutils literal notranslate"><span class="pre">marker.line.outliercolor</span></code> is
set. Defaults to “all” under the q1/median/q3
signature. Otherwise defaults to “outliers”.</p></li>
<li><p><strong>customdata</strong> – Assigns extra data each datum. This may be useful when
listening to hover, click and selection events. Note
that, “scatter” traces also appends customdata items in
the markers DOM elements</p></li>
<li><p><strong>customdatasrc</strong> – Sets the source reference on Chart Studio Cloud for
customdata .</p></li>
<li><p><strong>dx</strong> – Sets the x coordinate step for multi-box traces set
using q1/median/q3.</p></li>
<li><p><strong>dy</strong> – Sets the y coordinate step for multi-box traces set
using q1/median/q3.</p></li>
<li><p><strong>fillcolor</strong> – Sets the fill color. Defaults to a half-transparent
variant of the line color, marker color, or marker line
color, whichever is available.</p></li>
<li><p><strong>hoverinfo</strong> – Determines which trace information appear on hover. If
<code class="docutils literal notranslate"><span class="pre">none</span></code> or <code class="docutils literal notranslate"><span class="pre">skip</span></code> are set, no information is displayed
upon hovering. But, if <code class="docutils literal notranslate"><span class="pre">none</span></code> is set, click and hover
events are still fired.</p></li>
<li><p><strong>hoverinfosrc</strong> – Sets the source reference on Chart Studio Cloud for
hoverinfo .</p></li>
<li><p><strong>hoverlabel</strong> – <a class="reference internal" href="plotly.graph_objects.box.html#plotly.graph_objects.box.Hoverlabel" title="plotly.graph_objects.box.Hoverlabel"><code class="xref py py-class docutils literal notranslate"><span class="pre">plotly.graph_objects.box.Hoverlabel</span></code></a> instance
or dict with compatible properties</p></li>
<li><p><strong>hoveron</strong> – Do the hover effects highlight individual boxes or
sample points or both?</p></li>
<li><p><strong>hovertemplate</strong> – Template string used for rendering the information that
appear on hover box. Note that this will override
<code class="docutils literal notranslate"><span class="pre">hoverinfo</span></code>. Variables are inserted using %{variable},
for example “y: %{y}”. Numbers are formatted using
d3-format’s syntax %{variable:d3-format}, for example
“Price: %{y:$.2f}”. https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format for
details on the formatting syntax. Dates are formatted
using d3-time-format’s syntax %{variable|d3-time-
format}, for example “Day: %{2019-01-01|%A}”.
https://github.com/d3/d3-3.x-api-
reference/blob/master/Time-Formatting.md#format for
details on the date formatting syntax. The variables
available in <code class="docutils literal notranslate"><span class="pre">hovertemplate</span></code> are the ones emitted as
event data described at this link
<a class="reference external" href="https://plotly.com/javascript/plotlyjs-events/#event">https://plotly.com/javascript/plotlyjs-events/#event</a>-
data. Additionally, every attributes that can be
specified per-point (the ones that are <code class="docutils literal notranslate"><span class="pre">arrayOk:</span> <span class="pre">true</span></code>)
are available. Anything contained in tag <code class="docutils literal notranslate"><span class="pre"><extra></span></code> is
displayed in the secondary box, for example
“<extra>{fullData.name}</extra>”. To hide the secondary
box completely, use an empty tag <code class="docutils literal notranslate"><span class="pre"><extra></extra></span></code>.</p></li>
<li><p><strong>hovertemplatesrc</strong> – Sets the source reference on Chart Studio Cloud for
hovertemplate .</p></li>
<li><p><strong>hovertext</strong> – Same as <code class="docutils literal notranslate"><span class="pre">text</span></code>.</p></li>
<li><p><strong>hovertextsrc</strong> – Sets the source reference on Chart Studio Cloud for
hovertext .</p></li>
<li><p><strong>ids</strong> – Assigns id labels to each datum. These ids for object
constancy of data points during animation. Should be an
array of strings, not numbers or any other type.</p></li>
<li><p><strong>idssrc</strong> – Sets the source reference on Chart Studio Cloud for
ids .</p></li>
<li><p><strong>jitter</strong> – Sets the amount of jitter in the sample points drawn.
If 0, the sample points align along the distribution
axis. If 1, the sample points are drawn in a random
jitter of width equal to the width of the box(es).</p></li>
<li><p><strong>legendgroup</strong> – Sets the legend group for this trace. Traces part of
the same legend group hide/show at the same time when
toggling legend items.</p></li>
<li><p><strong>line</strong> – <a class="reference internal" href="plotly.graph_objects.box.html#plotly.graph_objects.box.Line" title="plotly.graph_objects.box.Line"><code class="xref py py-class docutils literal notranslate"><span class="pre">plotly.graph_objects.box.Line</span></code></a> instance or dict
with compatible properties</p></li>
<li><p><strong>lowerfence</strong> – Sets the lower fence values. There should be as many
items as the number of boxes desired. This attribute
has effect only under the q1/median/q3 signature. If
<code class="docutils literal notranslate"><span class="pre">lowerfence</span></code> is not provided but a sample (in <code class="docutils literal notranslate"><span class="pre">y</span></code> or
<code class="docutils literal notranslate"><span class="pre">x</span></code>) is set, we compute the lower as the last sample
point below 1.5 times the IQR.</p></li>
<li><p><strong>lowerfencesrc</strong> – Sets the source reference on Chart Studio Cloud for
lowerfence .</p></li>
<li><p><strong>marker</strong> – <a class="reference internal" href="plotly.graph_objects.box.html#plotly.graph_objects.box.Marker" title="plotly.graph_objects.box.Marker"><code class="xref py py-class docutils literal notranslate"><span class="pre">plotly.graph_objects.box.Marker</span></code></a> instance or
dict with compatible properties</p></li>
<li><p><strong>mean</strong> – Sets the mean values. There should be as many items as
the number of boxes desired. This attribute has effect
only under the q1/median/q3 signature. If <code class="docutils literal notranslate"><span class="pre">mean</span></code> is not
provided but a sample (in <code class="docutils literal notranslate"><span class="pre">y</span></code> or <code class="docutils literal notranslate"><span class="pre">x</span></code>) is set, we
compute the mean for each box using the sample values.</p></li>
<li><p><strong>meansrc</strong> – Sets the source reference on Chart Studio Cloud for
mean .</p></li>
<li><p><strong>median</strong> – Sets the median values. There should be as many items
as the number of boxes desired.</p></li>
<li><p><strong>mediansrc</strong> – Sets the source reference on Chart Studio Cloud for
median .</p></li>
<li><p><strong>meta</strong> – Assigns extra meta information associated with this
trace that can be used in various text attributes.
Attributes such as trace <code class="docutils literal notranslate"><span class="pre">name</span></code>, graph, axis and
colorbar <code class="docutils literal notranslate"><span class="pre">title.text</span></code>, annotation <code class="docutils literal notranslate"><span class="pre">text</span></code>
<code class="docutils literal notranslate"><span class="pre">rangeselector</span></code>, <code class="docutils literal notranslate"><span class="pre">updatemenues</span></code> and <code class="docutils literal notranslate"><span class="pre">sliders</span></code> <code class="docutils literal notranslate"><span class="pre">label</span></code>
text all support <code class="docutils literal notranslate"><span class="pre">meta</span></code>. To access the trace <code class="docutils literal notranslate"><span class="pre">meta</span></code>
values in an attribute in the same trace, simply use
<code class="docutils literal notranslate"><span class="pre">%{meta[i]}</span></code> where <code class="docutils literal notranslate"><span class="pre">i</span></code> is the index or key of the
<code class="docutils literal notranslate"><span class="pre">meta</span></code> item in question. To access trace <code class="docutils literal notranslate"><span class="pre">meta</span></code> in
layout attributes, use <code class="docutils literal notranslate"><span class="pre">%{data[n[.meta[i]}</span></code> where <code class="docutils literal notranslate"><span class="pre">i</span></code>
is the index or key of the <code class="docutils literal notranslate"><span class="pre">meta</span></code> and <code class="docutils literal notranslate"><span class="pre">n</span></code> is the trace
index.</p></li>
<li><p><strong>metasrc</strong> – Sets the source reference on Chart Studio Cloud for
meta .</p></li>
<li><p><strong>name</strong> – Sets the trace name. The trace name appear as the
legend item and on hover. For box traces, the name will
also be used for the position coordinate, if <code class="docutils literal notranslate"><span class="pre">x</span></code> and
<code class="docutils literal notranslate"><span class="pre">x0</span></code> (<code class="docutils literal notranslate"><span class="pre">y</span></code> and <code class="docutils literal notranslate"><span class="pre">y0</span></code> if horizontal) are missing and the
position axis is categorical</p></li>
<li><p><strong>notched</strong> – Determines whether or not notches are drawn. Notches
displays a confidence interval around the median. We
compute the confidence interval as median +/- 1.57 *
IQR / sqrt(N), where IQR is the interquartile range and
N is the sample size. If two boxes’ notches do not
overlap there is 95% confidence their medians differ.
See <a class="reference external" href="https://sites.google.com/site/davidsstatistics/home">https://sites.google.com/site/davidsstatistics/home</a>
/notched-box-plots for more info. Defaults to False
unless <code class="docutils literal notranslate"><span class="pre">notchwidth</span></code> or <code class="docutils literal notranslate"><span class="pre">notchspan</span></code> is set.</p></li>
<li><p><strong>notchspan</strong> – Sets the notch span from the boxes’ <code class="docutils literal notranslate"><span class="pre">median</span></code> values.
There should be as many items as the number of boxes
desired. This attribute has effect only under the
q1/median/q3 signature. If <code class="docutils literal notranslate"><span class="pre">notchspan</span></code> is not provided
but a sample (in <code class="docutils literal notranslate"><span class="pre">y</span></code> or <code class="docutils literal notranslate"><span class="pre">x</span></code>) is set, we compute it as
1.57 * IQR / sqrt(N), where N is the sample size.</p></li>
<li><p><strong>notchspansrc</strong> – Sets the source reference on Chart Studio Cloud for
notchspan .</p></li>
<li><p><strong>notchwidth</strong> – Sets the width of the notches relative to the box’
width. For example, with 0, the notches are as wide as
the box(es).</p></li>
<li><p><strong>offsetgroup</strong> – Set several traces linked to the same position axis or
matching axes to the same offsetgroup where bars of the
same position coordinate will line up.</p></li>
<li><p><strong>opacity</strong> – Sets the opacity of the trace.</p></li>
<li><p><strong>orientation</strong> – Sets the orientation of the box(es). If “v” (“h”), the
distribution is visualized along the vertical
(horizontal).</p></li>
<li><p><strong>pointpos</strong> – Sets the position of the sample points in relation to
the box(es). If 0, the sample points are places over
the center of the box(es). Positive (negative) values
correspond to positions to the right (left) for
vertical boxes and above (below) for horizontal boxes</p></li>
<li><p><strong>q1</strong> – Sets the Quartile 1 values. There should be as many
items as the number of boxes desired.</p></li>
<li><p><strong>q1src</strong> – Sets the source reference on Chart Studio Cloud for q1
.</p></li>
<li><p><strong>q3</strong> – Sets the Quartile 3 values. There should be as many
items as the number of boxes desired.</p></li>
<li><p><strong>q3src</strong> – Sets the source reference on Chart Studio Cloud for q3
.</p></li>
<li><p><strong>quartilemethod</strong> – Sets the method used to compute the sample’s Q1 and Q3
quartiles. The “linear” method uses the 25th percentile
for Q1 and 75th percentile for Q3 as computed using
method #10 (listed on <a class="reference external" href="http://www.amstat.org/publication">http://www.amstat.org/publication</a>
s/jse/v14n3/langford.html). The “exclusive” method uses
the median to divide the ordered dataset into two
halves if the sample is odd, it does not include the
median in either half - Q1 is then the median of the
lower half and Q3 the median of the upper half. The
“inclusive” method also uses the median to divide the
ordered dataset into two halves but if the sample is
odd, it includes the median in both halves - Q1 is then
the median of the lower half and Q3 the median of the
upper half.</p></li>
<li><p><strong>sd</strong> – Sets the standard deviation values. There should be as
many items as the number of boxes desired. This
attribute has effect only under the q1/median/q3
signature. If <code class="docutils literal notranslate"><span class="pre">sd</span></code> is not provided but a sample (in <code class="docutils literal notranslate"><span class="pre">y</span></code>
or <code class="docutils literal notranslate"><span class="pre">x</span></code>) is set, we compute the standard deviation for
each box using the sample values.</p></li>
<li><p><strong>sdsrc</strong> – Sets the source reference on Chart Studio Cloud for sd
.</p></li>
<li><p><strong>selected</strong> – <a class="reference internal" href="plotly.graph_objects.box.html#plotly.graph_objects.box.Selected" title="plotly.graph_objects.box.Selected"><code class="xref py py-class docutils literal notranslate"><span class="pre">plotly.graph_objects.box.Selected</span></code></a> instance or
dict with compatible properties</p></li>
<li><p><strong>selectedpoints</strong> – Array containing integer indices of selected points.
Has an effect only for traces that support selections.
Note that an empty array means an empty selection where
the <code class="docutils literal notranslate"><span class="pre">unselected</span></code> are turned on for all points, whereas,
any other non-array values means no selection all where
the <code class="docutils literal notranslate"><span class="pre">selected</span></code> and <code class="docutils literal notranslate"><span class="pre">unselected</span></code> styles have no effect.</p></li>
<li><p><strong>showlegend</strong> – Determines whether or not an item corresponding to this
trace is shown in the legend.</p></li>
<li><p><strong>stream</strong> – <a class="reference internal" href="plotly.graph_objects.box.html#plotly.graph_objects.box.Stream" title="plotly.graph_objects.box.Stream"><code class="xref py py-class docutils literal notranslate"><span class="pre">plotly.graph_objects.box.Stream</span></code></a> instance or
dict with compatible properties</p></li>
<li><p><strong>text</strong> – Sets the text elements associated with each sample
value. If a single string, the same string appears over
all the data points. If an array of string, the items
are mapped in order to the this trace’s (x,y)
coordinates. To be seen, trace <code class="docutils literal notranslate"><span class="pre">hoverinfo</span></code> must contain
a “text” flag.</p></li>
<li><p><strong>textsrc</strong> – Sets the source reference on Chart Studio Cloud for
text .</p></li>
<li><p><strong>uid</strong> – Assign an id to this trace, Use this to provide object
constancy between traces during animations and
transitions.</p></li>
<li><p><strong>uirevision</strong> – Controls persistence of some user-driven changes to the
trace: <code class="docutils literal notranslate"><span class="pre">constraintrange</span></code> in <code class="docutils literal notranslate"><span class="pre">parcoords</span></code> traces, as well
as some <code class="docutils literal notranslate"><span class="pre">editable:</span> <span class="pre">true</span></code> modifications such as <code class="docutils literal notranslate"><span class="pre">name</span></code>
and <code class="docutils literal notranslate"><span class="pre">colorbar.title</span></code>. Defaults to <code class="docutils literal notranslate"><span class="pre">layout.uirevision</span></code>.
Note that other user-driven trace attribute changes are
controlled by <code class="docutils literal notranslate"><span class="pre">layout</span></code> attributes: <code class="docutils literal notranslate"><span class="pre">trace.visible</span></code> is
controlled by <code class="docutils literal notranslate"><span class="pre">layout.legend.uirevision</span></code>,
<code class="docutils literal notranslate"><span class="pre">selectedpoints</span></code> is controlled by
<code class="docutils literal notranslate"><span class="pre">layout.selectionrevision</span></code>, and <code class="docutils literal notranslate"><span class="pre">colorbar.(x|y)</span></code>
(accessible with <code class="docutils literal notranslate"><span class="pre">config:</span> <span class="pre">{editable:</span> <span class="pre">true}</span></code>) is
controlled by <code class="docutils literal notranslate"><span class="pre">layout.editrevision</span></code>. Trace changes are
tracked by <code class="docutils literal notranslate"><span class="pre">uid</span></code>, which only falls back on trace index
if no <code class="docutils literal notranslate"><span class="pre">uid</span></code> is provided. So if your app can add/remove
traces before the end of the <code class="docutils literal notranslate"><span class="pre">data</span></code> array, such that
the same trace has a different index, you can still
preserve user-driven changes if you give each trace a
<code class="docutils literal notranslate"><span class="pre">uid</span></code> that stays with it as it moves.</p></li>
<li><p><strong>unselected</strong> – <a class="reference internal" href="plotly.graph_objects.box.html#plotly.graph_objects.box.Unselected" title="plotly.graph_objects.box.Unselected"><code class="xref py py-class docutils literal notranslate"><span class="pre">plotly.graph_objects.box.Unselected</span></code></a> instance
or dict with compatible properties</p></li>
<li><p><strong>upperfence</strong> – Sets the upper fence values. There should be as many
items as the number of boxes desired. This attribute
has effect only under the q1/median/q3 signature. If
<code class="docutils literal notranslate"><span class="pre">upperfence</span></code> is not provided but a sample (in <code class="docutils literal notranslate"><span class="pre">y</span></code> or
<code class="docutils literal notranslate"><span class="pre">x</span></code>) is set, we compute the lower as the last sample
point above 1.5 times the IQR.</p></li>
<li><p><strong>upperfencesrc</strong> – Sets the source reference on Chart Studio Cloud for
upperfence .</p></li>
<li><p><strong>visible</strong> – Determines whether or not this trace is visible. If
“legendonly”, the trace is not drawn, but can appear as
a legend item (provided that the legend itself is
visible).</p></li>
<li><p><strong>whiskerwidth</strong> – Sets the width of the whiskers relative to the box’
width. For example, with 1, the whiskers are as wide as
the box(es).</p></li>
<li><p><strong>width</strong> – Sets the width of the box in data coordinate If 0
(default value) the width is automatically selected
based on the positions of other box traces in the same
subplot.</p></li>
<li><p><strong>x</strong> – Sets the x sample data or coordinates. See overview for
more info.</p></li>
<li><p><strong>x0</strong> – Sets the x coordinate for single-box traces or the
starting coordinate for multi-box traces set using
q1/median/q3. See overview for more info.</p></li>
<li><p><strong>xaxis</strong> – Sets a reference between this trace’s x coordinates and
a 2D cartesian x axis. If “x” (the default value), the
x coordinates refer to <code class="docutils literal notranslate"><span class="pre">layout.xaxis</span></code>. If “x2”, the x
coordinates refer to <code class="docutils literal notranslate"><span class="pre">layout.xaxis2</span></code>, and so on.</p></li>
<li><p><strong>xcalendar</strong> – Sets the calendar system to use with <code class="docutils literal notranslate"><span class="pre">x</span></code> date data.</p></li>
<li><p><strong>xsrc</strong> – Sets the source reference on Chart Studio Cloud for x
.</p></li>
<li><p><strong>y</strong> – Sets the y sample data or coordinates. See overview for
more info.</p></li>
<li><p><strong>y0</strong> – Sets the y coordinate for single-box traces or the
starting coordinate for multi-box traces set using
q1/median/q3. See overview for more info.</p></li>
<li><p><strong>yaxis</strong> – Sets a reference between this trace’s y coordinates and
a 2D cartesian y axis. If “y” (the default value), the
y coordinates refer to <code class="docutils literal notranslate"><span class="pre">layout.yaxis</span></code>. If “y2”, the y
coordinates refer to <code class="docutils literal notranslate"><span class="pre">layout.yaxis2</span></code>, and so on.</p></li>
<li><p><strong>ycalendar</strong> – Sets the calendar system to use with <code class="docutils literal notranslate"><span class="pre">y</span></code> date data.</p></li>
<li><p><strong>ysrc</strong> – Sets the source reference on Chart Studio Cloud for y
.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference internal" href="plotly.graph_objects.html#plotly.graph_objects.Box" title="plotly.graph_objects.Box">Box</a></p>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="id1">
<h1><a class="reference internal" href="plotly.graph_objects.html#module-plotly.graph_objects" title="plotly.graph_objects"><code class="xref py py-mod docutils literal notranslate"><span class="pre">plotly.graph_objects</span></code></a>.box<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h1>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#module-plotly.graph_objects.box" title="plotly.graph_objects.box"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plotly.graph_objects.box</span></code></a></p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<span class="target" id="module-plotly.graph_objects.box"></span><div class="clearer"></div></div>
</div>
</div>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-39373211-1']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>