forked from plotly/plotly.py
- Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_layout.py
7200 lines (6754 loc) · 304 KB
/
_layout.py
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
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
fromplotly.basedatatypesimportBaseLayoutTypeas_BaseLayoutType
importcopyas_copy
classLayout(_BaseLayoutType):
_subplotid_prop_names= [
"coloraxis",
"geo",
"legend",
"map",
"mapbox",
"polar",
"scene",
"smith",
"ternary",
"xaxis",
"yaxis",
]
importre
_subplotid_prop_re=re.compile("^("+"|".join(_subplotid_prop_names) +r")(\d+)$")
@property
def_subplotid_validators(self):
"""
dict of validator classes for each subplot type
Returns
-------
dict
"""
fromplotly.validators.layoutimport (
ColoraxisValidator,
GeoValidator,
LegendValidator,
MapValidator,
MapboxValidator,
PolarValidator,
SceneValidator,
SmithValidator,
TernaryValidator,
XaxisValidator,
YaxisValidator,
)
return {
"coloraxis": ColoraxisValidator,
"geo": GeoValidator,
"legend": LegendValidator,
"map": MapValidator,
"mapbox": MapboxValidator,
"polar": PolarValidator,
"scene": SceneValidator,
"smith": SmithValidator,
"ternary": TernaryValidator,
"xaxis": XaxisValidator,
"yaxis": YaxisValidator,
}
def_subplot_re_match(self, prop):
returnself._subplotid_prop_re.match(prop)
# class properties
# --------------------
_parent_path_str=""
_path_str="layout"
_valid_props= {
"activeselection",
"activeshape",
"annotationdefaults",
"annotations",
"autosize",
"autotypenumbers",
"barcornerradius",
"bargap",
"bargroupgap",
"barmode",
"barnorm",
"boxgap",
"boxgroupgap",
"boxmode",
"calendar",
"clickmode",
"coloraxis",
"colorscale",
"colorway",
"computed",
"datarevision",
"dragmode",
"editrevision",
"extendfunnelareacolors",
"extendiciclecolors",
"extendpiecolors",
"extendsunburstcolors",
"extendtreemapcolors",
"font",
"funnelareacolorway",
"funnelgap",
"funnelgroupgap",
"funnelmode",
"geo",
"grid",
"height",
"hiddenlabels",
"hiddenlabelssrc",
"hidesources",
"hoverdistance",
"hoverlabel",
"hovermode",
"hoversubplots",
"iciclecolorway",
"imagedefaults",
"images",
"legend",
"map",
"mapbox",
"margin",
"meta",
"metasrc",
"minreducedheight",
"minreducedwidth",
"modebar",
"newselection",
"newshape",
"paper_bgcolor",
"piecolorway",
"plot_bgcolor",
"polar",
"scattergap",
"scattermode",
"scene",
"selectdirection",
"selectiondefaults",
"selectionrevision",
"selections",
"separators",
"shapedefaults",
"shapes",
"showlegend",
"sliderdefaults",
"sliders",
"smith",
"spikedistance",
"sunburstcolorway",
"template",
"ternary",
"title",
"transition",
"treemapcolorway",
"uirevision",
"uniformtext",
"updatemenudefaults",
"updatemenus",
"violingap",
"violingroupgap",
"violinmode",
"waterfallgap",
"waterfallgroupgap",
"waterfallmode",
"width",
"xaxis",
"yaxis",
}
# activeselection
# ---------------
@property
defactiveselection(self):
"""
The 'activeselection' property is an instance of Activeselection
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.Activeselection`
- A dict of string/value properties that will be passed
to the Activeselection constructor
Supported dict properties:
fillcolor
Sets the color filling the active selection'
interior.
opacity
Sets the opacity of the active selection.
Returns
-------
plotly.graph_objs.layout.Activeselection
"""
returnself["activeselection"]
@activeselection.setter
defactiveselection(self, val):
self["activeselection"] =val
# activeshape
# -----------
@property
defactiveshape(self):
"""
The 'activeshape' property is an instance of Activeshape
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.Activeshape`
- A dict of string/value properties that will be passed
to the Activeshape constructor
Supported dict properties:
fillcolor
Sets the color filling the active shape'
interior.
opacity
Sets the opacity of the active shape.
Returns
-------
plotly.graph_objs.layout.Activeshape
"""
returnself["activeshape"]
@activeshape.setter
defactiveshape(self, val):
self["activeshape"] =val
# annotations
# -----------
@property
defannotations(self):
"""
The 'annotations' property is a tuple of instances of
Annotation that may be specified as:
- A list or tuple of instances of plotly.graph_objs.layout.Annotation
- A list or tuple of dicts of string/value properties that
will be passed to the Annotation constructor
Supported dict properties:
align
Sets the horizontal alignment of the `text`
within the box. Has an effect only if `text`
spans two or more lines (i.e. `text` contains
one or more <br> HTML tags) or if an explicit
width is set to override the text width.
arrowcolor
Sets the color of the annotation arrow.
arrowhead
Sets the end annotation arrow head style.
arrowside
Sets the annotation arrow head position.
arrowsize
Sets the size of the end annotation arrow head,
relative to `arrowwidth`. A value of 1
(default) gives a head about 3x as wide as the
line.
arrowwidth
Sets the width (in px) of annotation arrow
line.
ax
Sets the x component of the arrow tail about
the arrow head. If `axref` is `pixel`, a
positive (negative) component corresponds to an
arrow pointing from right to left (left to
right). If `axref` is not `pixel` and is
exactly the same as `xref`, this is an absolute
value on that axis, like `x`, specified in the
same coordinates as `xref`.
axref
Indicates in what coordinates the tail of the
annotation (ax,ay) is specified. If set to a x
axis id (e.g. "x" or "x2"), the `x` position
refers to a x coordinate. If set to "paper",
the `x` position refers to the distance from
the left of the plotting area in normalized
coordinates where 0 (1) corresponds to the left
(right). If set to a x axis ID followed by
"domain" (separated by a space), the position
behaves like for "paper", but refers to the
distance in fractions of the domain length from
the left of the domain of that axis: e.g., *x2
domain* refers to the domain of the second x
axis and a x position of 0.5 refers to the
point between the left and the right of the
domain of the second x axis. In order for
absolute positioning of the arrow to work,
"axref" must be exactly the same as "xref",
otherwise "axref" will revert to "pixel"
(explained next). For relative positioning,
"axref" can be set to "pixel", in which case
the "ax" value is specified in pixels relative
to "x". Absolute positioning is useful for
trendline annotations which should continue to
indicate the correct trend when zoomed.
Relative positioning is useful for specifying
the text offset for an annotated point.
ay
Sets the y component of the arrow tail about
the arrow head. If `ayref` is `pixel`, a
positive (negative) component corresponds to an
arrow pointing from bottom to top (top to
bottom). If `ayref` is not `pixel` and is
exactly the same as `yref`, this is an absolute
value on that axis, like `y`, specified in the
same coordinates as `yref`.
ayref
Indicates in what coordinates the tail of the
annotation (ax,ay) is specified. If set to a y
axis id (e.g. "y" or "y2"), the `y` position
refers to a y coordinate. If set to "paper",
the `y` position refers to the distance from
the bottom of the plotting area in normalized
coordinates where 0 (1) corresponds to the
bottom (top). If set to a y axis ID followed by
"domain" (separated by a space), the position
behaves like for "paper", but refers to the
distance in fractions of the domain length from
the bottom of the domain of that axis: e.g.,
*y2 domain* refers to the domain of the second
y axis and a y position of 0.5 refers to the
point between the bottom and the top of the
domain of the second y axis. In order for
absolute positioning of the arrow to work,
"ayref" must be exactly the same as "yref",
otherwise "ayref" will revert to "pixel"
(explained next). For relative positioning,
"ayref" can be set to "pixel", in which case
the "ay" value is specified in pixels relative
to "y". Absolute positioning is useful for
trendline annotations which should continue to
indicate the correct trend when zoomed.
Relative positioning is useful for specifying
the text offset for an annotated point.
bgcolor
Sets the background color of the annotation.
bordercolor
Sets the color of the border enclosing the
annotation `text`.
borderpad
Sets the padding (in px) between the `text` and
the enclosing border.
borderwidth
Sets the width (in px) of the border enclosing
the annotation `text`.
captureevents
Determines whether the annotation text box
captures mouse move and click events, or allows
those events to pass through to data points in
the plot that may be behind the annotation. By
default `captureevents` is False unless
`hovertext` is provided. If you use the event
`plotly_clickannotation` without `hovertext`
you must explicitly enable `captureevents`.
clicktoshow
Makes this annotation respond to clicks on the
plot. If you click a data point that exactly
matches the `x` and `y` values of this
annotation, and it is hidden (visible: false),
it will appear. In "onoff" mode, you must click
the same point again to make it disappear, so
if you click multiple points, you can show
multiple annotations. In "onout" mode, a click
anywhere else in the plot (on another data
point or not) will hide this annotation. If you
need to show/hide this annotation in response
to different `x` or `y` values, you can set
`xclick` and/or `yclick`. This is useful for
example to label the side of a bar. To label
markers though, `standoff` is preferred over
`xclick` and `yclick`.
font
Sets the annotation text font.
height
Sets an explicit height for the text box. null
(default) lets the text set the box height.
Taller text will be clipped.
hoverlabel
:class:`plotly.graph_objects.layout.annotation.
Hoverlabel` instance or dict with compatible
properties
hovertext
Sets text to appear when hovering over this
annotation. If omitted or blank, no hover label
will appear.
name
When used in a template, named items are
created in the output figure in addition to any
items the figure already has in this array. You
can modify these items in the output figure by
making your own item with `templateitemname`
matching this `name` alongside your
modifications (including `visible: false` or
`enabled: false` to hide it). Has no effect
outside of a template.
opacity
Sets the opacity of the annotation (text +
arrow).
showarrow
Determines whether or not the annotation is
drawn with an arrow. If True, `text` is placed
near the arrow's tail. If False, `text` lines
up with the `x` and `y` provided.
standoff
Sets a distance, in pixels, to move the end
arrowhead away from the position it is pointing
at, for example to point at the edge of a
marker independent of zoom. Note that this
shortens the arrow from the `ax` / `ay` vector,
in contrast to `xshift` / `yshift` which moves
everything by this amount.
startarrowhead
Sets the start annotation arrow head style.
startarrowsize
Sets the size of the start annotation arrow
head, relative to `arrowwidth`. A value of 1
(default) gives a head about 3x as wide as the
line.
startstandoff
Sets a distance, in pixels, to move the start
arrowhead away from the position it is pointing
at, for example to point at the edge of a
marker independent of zoom. Note that this
shortens the arrow from the `ax` / `ay` vector,
in contrast to `xshift` / `yshift` which moves
everything by this amount.
templateitemname
Used to refer to a named item in this array in
the template. Named items from the template
will be created even without a matching item in
the input figure, but you can modify one by
making an item with `templateitemname` matching
its `name`, alongside your modifications
(including `visible: false` or `enabled: false`
to hide it). If there is no template or no
matching item, this item will be hidden unless
you explicitly show it with `visible: true`.
text
Sets the text associated with this annotation.
Plotly uses a subset of HTML tags to do things
like newline (<br>), bold (<b></b>), italics
(<i></i>), hyperlinks (<a href='...'></a>).
Tags <em>, <sup>, <sub>, <s>, <u> <span> are
also supported.
textangle
Sets the angle at which the `text` is drawn
with respect to the horizontal.
valign
Sets the vertical alignment of the `text`
within the box. Has an effect only if an
explicit height is set to override the text
height.
visible
Determines whether or not this annotation is
visible.
width
Sets an explicit width for the text box. null
(default) lets the text set the box width.
Wider text will be clipped. There is no
automatic wrapping; use <br> to start a new
line.
x
Sets the annotation's x position. If the axis
`type` is "log", then you must take the log of
your desired range. If the axis `type` is
"date", it should be date strings, like date
data, though Date objects and unix milliseconds
will be accepted and converted to strings. If
the axis `type` is "category", it should be
numbers, using the scale where each category is
assigned a serial number from zero in the order
it appears.
xanchor
Sets the text box's horizontal position anchor
This anchor binds the `x` position to the
"left", "center" or "right" of the annotation.
For example, if `x` is set to 1, `xref` to
"paper" and `xanchor` to "right" then the
right-most portion of the annotation lines up
with the right-most edge of the plotting area.
If "auto", the anchor is equivalent to "center"
for data-referenced annotations or if there is
an arrow, whereas for paper-referenced with no
arrow, the anchor picked corresponds to the
closest side.
xclick
Toggle this annotation when clicking a data
point whose `x` value is `xclick` rather than
the annotation's `x` value.
xref
Sets the annotation's x coordinate axis. If set
to a x axis id (e.g. "x" or "x2"), the `x`
position refers to a x coordinate. If set to
"paper", the `x` position refers to the
distance from the left of the plotting area in
normalized coordinates where 0 (1) corresponds
to the left (right). If set to a x axis ID
followed by "domain" (separated by a space),
the position behaves like for "paper", but
refers to the distance in fractions of the
domain length from the left of the domain of
that axis: e.g., *x2 domain* refers to the
domain of the second x axis and a x position
of 0.5 refers to the point between the left and
the right of the domain of the second x axis.
xshift
Shifts the position of the whole annotation and
arrow to the right (positive) or left
(negative) by this many pixels.
y
Sets the annotation's y position. If the axis
`type` is "log", then you must take the log of
your desired range. If the axis `type` is
"date", it should be date strings, like date
data, though Date objects and unix milliseconds
will be accepted and converted to strings. If
the axis `type` is "category", it should be
numbers, using the scale where each category is
assigned a serial number from zero in the order
it appears.
yanchor
Sets the text box's vertical position anchor
This anchor binds the `y` position to the
"top", "middle" or "bottom" of the annotation.
For example, if `y` is set to 1, `yref` to
"paper" and `yanchor` to "top" then the top-
most portion of the annotation lines up with
the top-most edge of the plotting area. If
"auto", the anchor is equivalent to "middle"
for data-referenced annotations or if there is
an arrow, whereas for paper-referenced with no
arrow, the anchor picked corresponds to the
closest side.
yclick
Toggle this annotation when clicking a data
point whose `y` value is `yclick` rather than
the annotation's `y` value.
yref
Sets the annotation's y coordinate axis. If set
to a y axis id (e.g. "y" or "y2"), the `y`
position refers to a y coordinate. If set to
"paper", the `y` position refers to the
distance from the bottom of the plotting area
in normalized coordinates where 0 (1)
corresponds to the bottom (top). If set to a y
axis ID followed by "domain" (separated by a
space), the position behaves like for "paper",
but refers to the distance in fractions of the
domain length from the bottom of the domain of
that axis: e.g., *y2 domain* refers to the
domain of the second y axis and a y position
of 0.5 refers to the point between the bottom
and the top of the domain of the second y axis.
yshift
Shifts the position of the whole annotation and
arrow up (positive) or down (negative) by this
many pixels.
Returns
-------
tuple[plotly.graph_objs.layout.Annotation]
"""
returnself["annotations"]
@annotations.setter
defannotations(self, val):
self["annotations"] =val
# annotationdefaults
# ------------------
@property
defannotationdefaults(self):
"""
When used in a template (as
layout.template.layout.annotationdefaults), sets the default
property values to use for elements of layout.annotations
The 'annotationdefaults' property is an instance of Annotation
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.Annotation`
- A dict of string/value properties that will be passed
to the Annotation constructor
Supported dict properties:
Returns
-------
plotly.graph_objs.layout.Annotation
"""
returnself["annotationdefaults"]
@annotationdefaults.setter
defannotationdefaults(self, val):
self["annotationdefaults"] =val
# autosize
# --------
@property
defautosize(self):
"""
Determines whether or not a layout width or height that has
been left undefined by the user is initialized on each
relayout. Note that, regardless of this attribute, an undefined
layout width or height is always initialized on the first call
to plot.
The 'autosize' property must be specified as a bool
(either True, or False)
Returns
-------
bool
"""
returnself["autosize"]
@autosize.setter
defautosize(self, val):
self["autosize"] =val
# autotypenumbers
# ---------------
@property
defautotypenumbers(self):
"""
Using "strict" a numeric string in trace data is not converted
to a number. Using *convert types* a numeric string in trace
data may be treated as a number during automatic axis `type`
detection. This is the default value; however it could be
overridden for individual axes.
The 'autotypenumbers' property is an enumeration that may be specified as:
- One of the following enumeration values:
['convert types', 'strict']
Returns
-------
Any
"""
returnself["autotypenumbers"]
@autotypenumbers.setter
defautotypenumbers(self, val):
self["autotypenumbers"] =val
# barcornerradius
# ---------------
@property
defbarcornerradius(self):
"""
Sets the rounding of bar corners. May be an integer number of
pixels, or a percentage of bar width (as a string ending in %).
The 'barcornerradius' property accepts values of any type
Returns
-------
Any
"""
returnself["barcornerradius"]
@barcornerradius.setter
defbarcornerradius(self, val):
self["barcornerradius"] =val
# bargap
# ------
@property
defbargap(self):
"""
Sets the gap (in plot fraction) between bars of adjacent
location coordinates.
The 'bargap' property is a number and may be specified as:
- An int or float in the interval [0, 1]
Returns
-------
int|float
"""
returnself["bargap"]
@bargap.setter
defbargap(self, val):
self["bargap"] =val
# bargroupgap
# -----------
@property
defbargroupgap(self):
"""
Sets the gap (in plot fraction) between bars of the same
location coordinate.
The 'bargroupgap' property is a number and may be specified as:
- An int or float in the interval [0, 1]
Returns
-------
int|float
"""
returnself["bargroupgap"]
@bargroupgap.setter
defbargroupgap(self, val):
self["bargroupgap"] =val
# barmode
# -------
@property
defbarmode(self):
"""
Determines how bars at the same location coordinate are
displayed on the graph. With "stack", the bars are stacked on
top of one another With "relative", the bars are stacked on top
of one another, with negative values below the axis, positive
values above With "group", the bars are plotted next to one
another centered around the shared location. With "overlay",
the bars are plotted over one another, you might need to reduce
"opacity" to see multiple bars.
The 'barmode' property is an enumeration that may be specified as:
- One of the following enumeration values:
['stack', 'group', 'overlay', 'relative']
Returns
-------
Any
"""
returnself["barmode"]
@barmode.setter
defbarmode(self, val):
self["barmode"] =val
# barnorm
# -------
@property
defbarnorm(self):
"""
Sets the normalization for bar traces on the graph. With
"fraction", the value of each bar is divided by the sum of all
values at that location coordinate. "percent" is the same but
multiplied by 100 to show percentages.
The 'barnorm' property is an enumeration that may be specified as:
- One of the following enumeration values:
['', 'fraction', 'percent']
Returns
-------
Any
"""
returnself["barnorm"]
@barnorm.setter
defbarnorm(self, val):
self["barnorm"] =val
# boxgap
# ------
@property
defboxgap(self):
"""
Sets the gap (in plot fraction) between boxes of adjacent
location coordinates. Has no effect on traces that have "width"
set.
The 'boxgap' property is a number and may be specified as:
- An int or float in the interval [0, 1]
Returns
-------
int|float
"""
returnself["boxgap"]
@boxgap.setter
defboxgap(self, val):
self["boxgap"] =val
# boxgroupgap
# -----------
@property
defboxgroupgap(self):
"""
Sets the gap (in plot fraction) between boxes of the same
location coordinate. Has no effect on traces that have "width"
set.
The 'boxgroupgap' property is a number and may be specified as:
- An int or float in the interval [0, 1]
Returns
-------
int|float
"""
returnself["boxgroupgap"]
@boxgroupgap.setter
defboxgroupgap(self, val):
self["boxgroupgap"] =val
# boxmode
# -------
@property
defboxmode(self):
"""
Determines how boxes at the same location coordinate are
displayed on the graph. If "group", the boxes are plotted next
to one another centered around the shared location. If
"overlay", the boxes are plotted over one another, you might
need to set "opacity" to see them multiple boxes. Has no effect
on traces that have "width" set.
The 'boxmode' property is an enumeration that may be specified as:
- One of the following enumeration values:
['group', 'overlay']
Returns
-------
Any
"""
returnself["boxmode"]
@boxmode.setter
defboxmode(self, val):
self["boxmode"] =val
# calendar
# --------
@property
defcalendar(self):
"""
Sets the default calendar system to use for interpreting and
displaying dates throughout the plot.
The 'calendar' property is an enumeration that may be specified as:
- One of the following enumeration values:
['chinese', 'coptic', 'discworld', 'ethiopian',
'gregorian', 'hebrew', 'islamic', 'jalali', 'julian',
'mayan', 'nanakshahi', 'nepali', 'persian', 'taiwan',
'thai', 'ummalqura']
Returns
-------
Any
"""
returnself["calendar"]
@calendar.setter
defcalendar(self, val):
self["calendar"] =val
# clickmode
# ---------
@property
defclickmode(self):
"""
Determines the mode of single click interactions. "event" is
the default value and emits the `plotly_click` event. In
addition this mode emits the `plotly_selected` event in drag
modes "lasso" and "select", but with no event data attached
(kept for compatibility reasons). The "select" flag enables
selecting single data points via click. This mode also supports
persistent selections, meaning that pressing Shift while
clicking, adds to / subtracts from an existing selection.
"select" with `hovermode`: "x" can be confusing, consider
explicitly setting `hovermode`: "closest" when using this
feature. Selection events are sent accordingly as long as
"event" flag is set as well. When the "event" flag is missing,
`plotly_click` and `plotly_selected` events are not fired.
The 'clickmode' property is a flaglist and may be specified
as a string containing:
- Any combination of ['event', 'select'] joined with '+' characters
(e.g. 'event+select')
OR exactly one of ['none'] (e.g. 'none')
Returns
-------
Any
"""
returnself["clickmode"]
@clickmode.setter
defclickmode(self, val):
self["clickmode"] =val
# coloraxis
# ---------
@property
defcoloraxis(self):
"""
The 'coloraxis' property is an instance of Coloraxis
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.Coloraxis`
- A dict of string/value properties that will be passed
to the Coloraxis constructor
Supported dict properties:
autocolorscale
Determines whether the colorscale is a default
palette (`autocolorscale: true`) or the palette
determined by `colorscale`. In case
`colorscale` is unspecified or `autocolorscale`
is true, the default palette will be chosen
according to whether numbers in the `color`
array are all positive, all negative or mixed.
cauto
Determines whether or not the color domain is
computed with respect to the input data (here
corresponding trace color array(s)) or the
bounds set in `cmin` and `cmax` Defaults to
`false` when `cmin` and `cmax` are set by the
user.
cmax
Sets the upper bound of the color domain. Value
should have the same units as corresponding
trace color array(s) and if set, `cmin` must be
set as well.
cmid
Sets the mid-point of the color domain by
scaling `cmin` and/or `cmax` to be equidistant
to this point. Value should have the same units
as corresponding trace color array(s). Has no
effect when `cauto` is `false`.
cmin
Sets the lower bound of the color domain. Value
should have the same units as corresponding
trace color array(s) and if set, `cmax` must be
set as well.
colorbar
:class:`plotly.graph_objects.layout.coloraxis.C
olorBar` instance or dict with compatible
properties
colorscale
Sets the colorscale. The colorscale must be an
array containing arrays mapping a normalized
value to an rgb, rgba, hex, hsl, hsv, or named
color string. At minimum, a mapping for the
lowest (0) and highest (1) values are required.
For example, `[[0, 'rgb(0,0,255)'], [1,
'rgb(255,0,0)']]`. To control the bounds of the
colorscale in color space, use `cmin` and
`cmax`. Alternatively, `colorscale` may be a
palette name string of the following list: Blac
kbody,Bluered,Blues,Cividis,Earth,Electric,Gree
ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R
eds,Viridis,YlGnBu,YlOrRd.
reversescale
Reverses the color mapping if true. If true,
`cmin` will correspond to the last color in the
array and `cmax` will correspond to the first
color.
showscale
Determines whether or not a colorbar is
displayed for this trace.
Returns
-------
plotly.graph_objs.layout.Coloraxis
"""
returnself["coloraxis"]
@coloraxis.setter
defcoloraxis(self, val):
self["coloraxis"] =val
# colorscale
# ----------
@property
defcolorscale(self):
"""
The 'colorscale' property is an instance of Colorscale
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.Colorscale`
- A dict of string/value properties that will be passed
to the Colorscale constructor
Supported dict properties:
diverging
Sets the default diverging colorscale. Note
that `autocolorscale` must be true for this
attribute to work.
sequential
Sets the default sequential colorscale for
positive values. Note that `autocolorscale`
must be true for this attribute to work.
sequentialminus
Sets the default sequential colorscale for
negative values. Note that `autocolorscale`
must be true for this attribute to work.
Returns
-------
plotly.graph_objs.layout.Colorscale
"""
returnself["colorscale"]
@colorscale.setter
defcolorscale(self, val):