-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathChart2D_Histogram.fs
More file actions
979 lines (937 loc) · 66.4 KB
/
Chart2D_Histogram.fs
File metadata and controls
979 lines (937 loc) · 66.4 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
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
namespace Plotly.NET
open Plotly.NET.LayoutObjects
open Plotly.NET.TraceObjects
open DynamicObj
open System
open System.IO
open System.Runtime.CompilerServices
open System.Runtime.InteropServices
[<AutoOpen>]
module Chart2D_Histogram =
[<Extension>]
type Chart =
/// <summary>
/// Visualizes the distribution of the input data as a histogram.
///
/// A histogram is an approximate representation of the distribution of numerical data. To construct a histogram, the first step is to "bin" the range of values - that is, divide the entire range of values into a series of intervals - and then count how many values fall into each interval.
/// The bins are usually specified as consecutive, non-overlapping intervals of a variable.
///
/// The sample data from which statistics are computed is set in `x` for vertically spanning histograms and in `y` for horizontally spanning histograms. Binning options are set `xbins` and `ybins` respectively if no aggregation data is provided.
/// </summary>
/// <param name="X">Sets the sample data to be binned on the x axis.</param>
/// <param name="MultiX">Sets the sample data to be binned on the x axis. Use two inner arrays here to plot multicategorial data</param>
/// <param name="Y">Sets the sample data to be binned on the y axis.</param>
/// <param name="MultiY">Sets the sample data to be binned on the y axis. Use two inner arrays here to plot multicategorial data</param>
/// <param name="Orientation">Sets the orientation of the bars. With "v" ("h"), the value of the each bar spans along the vertical (horizontal).</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the Opacity of the trace.</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="TextPosition">Sets the position of text associated with each datum</param>
/// <param name="HistFunc">Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.</param>
/// <param name="HistNorm">Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1).</param>
/// <param name="AlignmentGroup">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.</param>
/// <param name="OffsetGroup">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.</param>
/// <param name="NBinsX">Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided.</param>
/// <param name="NBinsY">Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided.</param>
/// <param name="BinGroup">Set a group of histogram traces which will have compatible bin settings. Note that traces on the same subplot and with the same "orientation" under `barmode` "stack", "relative" and "group" are forced into the same bingroup, Using `bingroup`, traces under `barmode` "overlay" and on different axes (of the same axis type) can have compatible bin settings. Note that histogram and histogram2d" trace can share the same `bingroup`</param>
/// <param name="XBins">Sets the binning across the x dimension</param>
/// <param name="YBins">Sets the binning across the y dimension</param>
/// <param name="MarkerColor">Sets the color of the bars</param>
/// <param name="MarkerColorScale">Sets the colorscale for the bars. To have an effect, `MarkerColor` must map to color scale values.</param>
/// <param name="MarkerOutline">Sets the color of the bar outlines</param>
/// <param name="MarkerPatternShape">Sets a pattern shape for all bars</param>
/// <param name="MultiMarkerPatternShape">Sets an individual pattern shape for each bar</param>
/// <param name="MarkerPattern">Sets the marker pattern (use this for more finegrained control than the other pattern-associated arguments).</param>
/// <param name="Marker">Sets the marker of this trace.</param>
/// <param name="Line">Sets the outline of the histogram's bars.</param>
/// <param name="XError">Sets the x error of this trace.</param>
/// <param name="YError">Sets the y error of this trace.</param>
/// <param name="Cumulative">Sets whether and how the cumulative distribution is displayed</param>
/// <param name="HoverLabel">Sets the style of the hoverlabels of this trace.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Histogram
(
?X: seq<#IConvertible>,
?MultiX: seq<seq<#IConvertible>>,
?Y: seq<#IConvertible>,
?MultiY: seq<seq<#IConvertible>>,
?Orientation: StyleParam.Orientation,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?Text: #IConvertible,
?MultiText: seq<#IConvertible>,
?TextPosition: StyleParam.TextPosition,
?HistFunc: StyleParam.HistFunc,
?HistNorm: StyleParam.HistNorm,
?AlignmentGroup: string,
?OffsetGroup: string,
?NBinsX: int,
?NBinsY: int,
?BinGroup: string,
?XBins: Bins,
?YBins: Bins,
?MarkerColor: Color,
?MarkerColorScale: StyleParam.Colorscale,
?MarkerOutline: Line,
?MarkerPatternShape: StyleParam.PatternShape,
?MultiMarkerPatternShape: seq<StyleParam.PatternShape>,
?MarkerPattern: Pattern,
?Marker: Marker,
?Line: Line,
?XError: Error,
?YError: Error,
?Cumulative: Cumulative,
?HoverLabel: Hoverlabel,
?UseDefaults: bool
) =
let useDefaults =
defaultArg UseDefaults true
let pattern =
MarkerPattern
|> Option.defaultValue (TraceObjects.Pattern.init ())
|> TraceObjects.Pattern.style (?Shape = MarkerPatternShape, ?MultiShape = MultiMarkerPatternShape)
let marker =
Marker
|> Option.defaultValue (TraceObjects.Marker.init ())
|> TraceObjects.Marker.style (
?Color = MarkerColor,
Pattern = pattern,
?Colorscale = MarkerColorScale,
?Outline = MarkerOutline
)
Trace2D.initHistogram (
Trace2DStyle.Histogram(
?X = X,
?MultiX = MultiX,
?Y = Y,
?MultiY = MultiY,
?Orientation = Orientation,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?Text = Text,
?MultiText = MultiText,
?TextPosition = TextPosition,
?HistFunc = HistFunc,
?HistNorm = HistNorm,
?AlignmentGroup = AlignmentGroup,
?OffsetGroup = OffsetGroup,
?NBinsX = NBinsX,
?NBinsY = NBinsY,
?BinGroup = BinGroup,
?XBins = XBins,
?YBins = YBins,
Marker = marker,
?Line = Line,
?XError = XError,
?YError = YError,
?Cumulative = Cumulative,
?HoverLabel = HoverLabel
)
)
|> GenericChart.ofTraceObject useDefaults
/// <summary>
/// Visualizes the distribution of the input data as a histogram, automatically determining if the data is to be used for the x or y dimension based on the `orientation` parameter.
///
/// A histogram is an approximate representation of the distribution of numerical data. To construct a histogram, the first step is to "bin" the range of values - that is, divide the entire range of values into a series of intervals - and then count how many values fall into each interval.
/// The bins are usually specified as consecutive, non-overlapping intervals of a variable.
///
/// Binning options are set `xbins` and `ybins` respectively if no aggregation data is provided.
/// </summary>
/// <param name="data">Sets the sample data to be binned</param>
/// <param name="orientation">Sets the orientation of the bars. With "v" ("h"), the value of the each bar spans along the vertical (horizontal).</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the Opacity of the trace.</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="HistFunc">Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.</param>
/// <param name="HistNorm">Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1).</param>
/// <param name="AlignmentGroup">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.</param>
/// <param name="OffsetGroup">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.</param>
/// <param name="NBinsX">Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided.</param>
/// <param name="NBinsY">Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided.</param>
/// <param name="BinGroup">Set a group of histogram traces which will have compatible bin settings. Note that traces on the same subplot and with the same "orientation" under `barmode` "stack", "relative" and "group" are forced into the same bingroup, Using `bingroup`, traces under `barmode` "overlay" and on different axes (of the same axis type) can have compatible bin settings. Note that histogram and histogram2d" trace can share the same `bingroup`</param>
/// <param name="XBins">Sets the binning across the x dimension</param>
/// <param name="YBins">Sets the binning across the y dimension</param>
/// <param name="MarkerColor">Sets the color of the histogram's bars.</param>
/// <param name="Marker">Sets the marker for the histogram's bars (use this for more finegrained control than the other marker-associated arguments).</param>
/// <param name="Line">Sets the outline of the histogram's bars.</param>
/// <param name="XError">Sets the x error of this trace.</param>
/// <param name="YError">Sets the y error of this trace.</param>
/// <param name="Cumulative">Sets whether and how the cumulative distribution is displayed</param>
/// <param name="HoverLabel">Sets the style of the hoverlabels of this trace.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Histogram
(
data: seq<#IConvertible>,
orientation: StyleParam.Orientation,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?Text: #IConvertible,
?MultiText: seq<#IConvertible>,
?HistFunc: StyleParam.HistFunc,
?HistNorm: StyleParam.HistNorm,
?AlignmentGroup: string,
?OffsetGroup: string,
?NBinsX: int,
?NBinsY: int,
?BinGroup: string,
?XBins: Bins,
?YBins: Bins,
?MarkerColor: Color,
?Marker: Marker,
?Line: Line,
?XError: Error,
?YError: Error,
?Cumulative: Cumulative,
?HoverLabel: Hoverlabel,
?UseDefaults: bool
) =
let useDefaults =
defaultArg UseDefaults true
let histChart =
Trace2D.initHistogram (
Trace2DStyle.Histogram(
?Opacity = Opacity,
?Text = Text,
?MultiText = MultiText,
Orientation = orientation,
?HistFunc = HistFunc,
?HistNorm = HistNorm,
?AlignmentGroup = AlignmentGroup,
?OffsetGroup = OffsetGroup,
?NBinsX = NBinsX,
?NBinsY = NBinsY,
?BinGroup = BinGroup,
?XBins = XBins,
?YBins = YBins,
?Marker = Marker,
?Line = Line,
?XError = XError,
?YError = YError,
?Cumulative = Cumulative,
?HoverLabel = HoverLabel
)
)
|> TraceStyle.Marker(?Color = MarkerColor)
|> TraceStyle.TraceInfo(?Name = Name, ?ShowLegend = ShowLegend)
|> GenericChart.ofTraceObject useDefaults
match orientation with
| StyleParam.Orientation.Horizontal -> histChart |> GenericChart.mapTrace (Trace2DStyle.Histogram(Y = data))
| StyleParam.Orientation.Vertical -> histChart |> GenericChart.mapTrace (Trace2DStyle.Histogram(X = data))
/// <summary>
/// Visualizes the distribution of the input data as a histogram using an encoded typed array.
/// </summary>
/// <param name="dataEncoded">Sets the sample data to be binned as an encoded typed array.</param>
/// <param name="orientation">Sets the orientation of the bars. With "v" ("h"), the value of the each bar spans along the vertical (horizontal).</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the Opacity of the trace.</param>
/// <param name="Text">Sets a text associated with each datum</param>
/// <param name="MultiText">Sets individual text for each datum</param>
/// <param name="HistFunc">Specifies the binning function used for this histogram trace.</param>
/// <param name="HistNorm">Specifies the type of normalization used for this histogram trace.</param>
/// <param name="AlignmentGroup">Set several traces linked to the same position axis or matching axes to the same alignmentgroup.</param>
/// <param name="OffsetGroup">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.</param>
/// <param name="NBinsX">Specifies the maximum number of desired bins.</param>
/// <param name="NBinsY">Specifies the maximum number of desired bins.</param>
/// <param name="BinGroup">Set a group of histogram traces which will have compatible bin settings.</param>
/// <param name="XBins">Sets the binning across the x dimension</param>
/// <param name="YBins">Sets the binning across the y dimension</param>
/// <param name="MarkerColor">Sets the color of the histogram's bars.</param>
/// <param name="Marker">Sets the marker for the histogram's bars.</param>
/// <param name="Line">Sets the outline of the histogram's bars.</param>
/// <param name="XError">Sets the x error of this trace.</param>
/// <param name="YError">Sets the y error of this trace.</param>
/// <param name="Cumulative">Sets whether and how the cumulative distribution is displayed</param>
/// <param name="HoverLabel">Sets the style of the hoverlabels of this trace.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Histogram
(
dataEncoded: EncodedTypedArray,
orientation: StyleParam.Orientation,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?Text: #IConvertible,
?MultiText: seq<#IConvertible>,
?HistFunc: StyleParam.HistFunc,
?HistNorm: StyleParam.HistNorm,
?AlignmentGroup: string,
?OffsetGroup: string,
?NBinsX: int,
?NBinsY: int,
?BinGroup: string,
?XBins: Bins,
?YBins: Bins,
?MarkerColor: Color,
?Marker: Marker,
?Line: Line,
?XError: Error,
?YError: Error,
?Cumulative: Cumulative,
?HoverLabel: Hoverlabel,
?UseDefaults: bool
) =
let useDefaults =
defaultArg UseDefaults true
let histChart =
Trace2D.initHistogram (
Trace2DStyle.Histogram(
?Opacity = Opacity,
?Text = Text,
?MultiText = MultiText,
Orientation = orientation,
?HistFunc = HistFunc,
?HistNorm = HistNorm,
?AlignmentGroup = AlignmentGroup,
?OffsetGroup = OffsetGroup,
?NBinsX = NBinsX,
?NBinsY = NBinsY,
?BinGroup = BinGroup,
?XBins = XBins,
?YBins = YBins,
?Marker = Marker,
?Line = Line,
?XError = XError,
?YError = YError,
?Cumulative = Cumulative,
?HoverLabel = HoverLabel
)
)
|> TraceStyle.Marker(?Color = MarkerColor)
|> TraceStyle.TraceInfo(?Name = Name, ?ShowLegend = ShowLegend)
|> GenericChart.ofTraceObject useDefaults
match orientation with
| StyleParam.Orientation.Horizontal -> histChart |> GenericChart.mapTrace (Trace2DStyle.Histogram(YEncoded = dataEncoded))
| StyleParam.Orientation.Vertical -> histChart |> GenericChart.mapTrace (Trace2DStyle.Histogram(XEncoded = dataEncoded))
/// <summary>
/// Visualizes the distribution of the 2-dimensional input data as 2D Histogram.
///
///The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case) or `z` (where `z` represent the 2D distribution and binning set, binning is set by `x` and `y` in this case). The resulting distribution is visualized as a heatmap.
/// </summary>
/// <param name="X">Sets the sample data to be binned on the x axis.</param>
/// <param name="MultiX">Sets the sample data to be binned on the x axis. Use two inner arrays here to plot multicategorial data</param>
/// <param name="Y">Sets the sample data to be binned on the y axis.</param>
/// <param name="MultiY">Sets the sample data to be binned on the y axis. Use two inner arrays here to plot multicategorial data</param>
/// <param name="Z">Sets the aggregation data.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the Opacity of the trace.</param>
/// <param name="XGap">Sets the horizontal gap (in pixels) between bricks.</param>
/// <param name="YGap">Sets the vertical gap (in pixels) between bricks.</param>
/// <param name="HistFunc">Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.</param>
/// <param name="HistNorm">Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1).</param>
/// <param name="NBinsX">Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided.</param>
/// <param name="NBinsY">Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided.</param>
/// <param name="XBins">Sets the binning across the x dimension</param>
/// <param name="YBins">Sets the binning across the y dimension</param>
/// <param name="ColorBar">Sets the styles of the colorbar for this trace.</param>
/// <param name="ColorScale">Sets the colorscale for this trace.</param>
/// <param name="ShowScale">Whether or not to show the colorscale/colorbar</param>
/// <param name="ReverseScale">Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color.</param>
/// <param name="ZSmooth">Picks a smoothing algorithm use to smooth `z` data.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Histogram2D
(
?X: seq<#IConvertible>,
?MultiX: seq<seq<#IConvertible>>,
?Y: seq<#IConvertible>,
?MultiY: seq<seq<#IConvertible>>,
?Z: seq<#seq<#IConvertible>>,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?XGap: int,
?YGap: int,
?HistFunc: StyleParam.HistFunc,
?HistNorm: StyleParam.HistNorm,
?NBinsX: int,
?NBinsY: int,
?XBins: Bins,
?YBins: Bins,
?ColorBar: ColorBar,
?ColorScale: StyleParam.Colorscale,
?ShowScale: bool,
?ReverseScale: bool,
?ZSmooth: StyleParam.SmoothAlg,
?UseDefaults: bool
) =
let useDefaults =
defaultArg UseDefaults true
Trace2D.initHistogram2D (
Trace2DStyle.Histogram2D(
?X = X,
?MultiX = MultiX,
?Y = Y,
?MultiY = MultiY,
?Z = Z,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?XGap = XGap,
?YGap = YGap,
?HistFunc = HistFunc,
?HistNorm = HistNorm,
?NBinsX = NBinsX,
?NBinsY = NBinsY,
?XBins = XBins,
?YBins = YBins,
?ColorBar = ColorBar,
?ColorScale = ColorScale,
?ShowScale = ShowScale,
?ReverseScale = ReverseScale,
?ZSmooth = ZSmooth
)
)
|> GenericChart.ofTraceObject useDefaults
/// <summary>
/// Visualizes the distribution of the encoded 2-dimensional input data as a 2D histogram.
///
/// The sample data from which statistics are computed is set in `xEncoded` and `yEncoded`, and optional encoded aggregation data can be provided through `zEncoded`.
/// </summary>
/// <param name="xEncoded">Sets the sample data to be binned on the x axis as an encoded typed array.</param>
/// <param name="yEncoded">Sets the sample data to be binned on the y axis as an encoded typed array.</param>
/// <param name="zEncoded">Sets the aggregation data as an encoded typed array.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the Opacity of the trace.</param>
/// <param name="XGap">Sets the horizontal gap (in pixels) between bricks.</param>
/// <param name="YGap">Sets the vertical gap (in pixels) between bricks.</param>
/// <param name="HistFunc">Specifies the binning function used for this histogram trace.</param>
/// <param name="HistNorm">Specifies the type of normalization used for this histogram trace.</param>
/// <param name="NBinsX">Specifies the maximum number of desired bins.</param>
/// <param name="NBinsY">Specifies the maximum number of desired bins.</param>
/// <param name="XBins">Sets the binning across the x dimension</param>
/// <param name="YBins">Sets the binning across the y dimension</param>
/// <param name="ColorBar">Sets the styles of the colorbar for this trace.</param>
/// <param name="ColorScale">Sets the colorscale for this trace.</param>
/// <param name="ShowScale">Whether or not to show the colorscale/colorbar</param>
/// <param name="ReverseScale">Reverses the color mapping if true.</param>
/// <param name="ZSmooth">Picks a smoothing algorithm use to smooth `z` data.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Histogram2D
(
xEncoded: EncodedTypedArray,
yEncoded: EncodedTypedArray,
?zEncoded: EncodedTypedArray,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?XGap: int,
?YGap: int,
?HistFunc: StyleParam.HistFunc,
?HistNorm: StyleParam.HistNorm,
?NBinsX: int,
?NBinsY: int,
?XBins: Bins,
?YBins: Bins,
?ColorBar: ColorBar,
?ColorScale: StyleParam.Colorscale,
?ShowScale: bool,
?ReverseScale: bool,
?ZSmooth: StyleParam.SmoothAlg,
?UseDefaults: bool
) =
let useDefaults =
defaultArg UseDefaults true
Trace2D.initHistogram2D (
Trace2DStyle.Histogram2D(
XEncoded = xEncoded,
YEncoded = yEncoded,
?ZEncoded = zEncoded,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?XGap = XGap,
?YGap = YGap,
?HistFunc = HistFunc,
?HistNorm = HistNorm,
?NBinsX = NBinsX,
?NBinsY = NBinsY,
?XBins = XBins,
?YBins = YBins,
?ColorBar = ColorBar,
?ColorScale = ColorScale,
?ShowScale = ShowScale,
?ReverseScale = ReverseScale,
?ZSmooth = ZSmooth
)
)
|> GenericChart.ofTraceObject useDefaults
/// <summary>
/// Visualizes the distribution of the 2-dimensional input data as 2D Histogram.
///
///The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case) or `z` (where `z` represent the 2D distribution and binning set, binning is set by `x` and `y` in this case). The resulting distribution is visualized as a heatmap.
/// </summary>
/// <param name="x">Sets the sample data to be binned on the x axis.</param>
/// <param name="y">Sets the sample data to be binned on the y axis.</param>
/// <param name="Z">Sets the aggregation data.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the Opacity of the trace.</param>
/// <param name="XGap">Sets the horizontal gap (in pixels) between bricks.</param>
/// <param name="YGap">Sets the vertical gap (in pixels) between bricks.</param>
/// <param name="HistFunc">Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.</param>
/// <param name="HistNorm">Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1).</param>
/// <param name="NBinsX">Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided.</param>
/// <param name="NBinsY">Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided.</param>
/// <param name="XBins">Sets the binning across the x dimension</param>
/// <param name="YBins">Sets the binning across the y dimension</param>
/// <param name="ColorBar">Sets the styles of the colorbar for this trace.</param>
/// <param name="ColorScale">Sets the colorscale for this trace.</param>
/// <param name="ShowScale">Whether or not to show the colorscale/colorbar</param>
/// <param name="ReverseScale">Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color.</param>
/// <param name="ZSmooth">Picks a smoothing algorithm use to smooth `z` data.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Histogram2D
(
x: seq<#IConvertible>,
y: seq<#IConvertible>,
?Z: seq<#seq<#IConvertible>>,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?XGap: int,
?YGap: int,
?HistFunc: StyleParam.HistFunc,
?HistNorm: StyleParam.HistNorm,
?NBinsX: int,
?NBinsY: int,
?XBins: Bins,
?YBins: Bins,
?ColorBar: ColorBar,
?ColorScale: StyleParam.Colorscale,
?ShowScale: bool,
?ReverseScale: bool,
?ZSmooth: StyleParam.SmoothAlg,
?UseDefaults: bool
) =
Chart.Histogram2D(
X = x,
Y = y,
?Z = Z,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?XGap = XGap,
?YGap = YGap,
?HistFunc = HistFunc,
?HistNorm = HistNorm,
?NBinsX = NBinsX,
?NBinsY = NBinsY,
?XBins = XBins,
?YBins = YBins,
?ColorBar = ColorBar,
?ColorScale = ColorScale,
?ShowScale = ShowScale,
?ReverseScale = ReverseScale,
?ZSmooth = ZSmooth,
?UseDefaults = UseDefaults
)
/// <summary>
/// Computes a 2D histogram contour plot, also known as a density contour plot, which is a 2-dimensional generalization of a histogram which resembles a contour plot but is computed by grouping a set of points specified by their x and y coordinates into bins, and applying an aggregation function such as count or sum (if z is provided) to compute the value to be used to compute contours.
///
/// The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case) or `z` (where `z` represent the 2D distribution and binning set, binning is set by `x` and `y` in this case). The resulting distribution is visualized as a contour plot.
/// </summary>
/// <param name="X">Sets the sample data to be binned on the x axis.</param>
/// <param name="MultiX">Sets the sample data to be binned on the x axis. Use two inner arrays here to plot multicategorial data</param>
/// <param name="Y">Sets the sample data to be binned on the y axis.</param>
/// <param name="MultiY">Sets the sample data to be binned on the y axis. Use two inner arrays here to plot multicategorial data</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover.</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the Opacity otf the trace.</param>
/// <param name="Z">Sets the aggregation data.</param>
/// <param name="HistFunc">Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.</param>
/// <param name="HistNorm">Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1).</param>
/// <param name="NBinsX">Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided.</param>
/// <param name="NBinsY">Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided.</param>
/// <param name="BinGroup">Set the `xbingroup` and `ybingroup` default prefix For example, setting a `bingroup` of "1" on two histogram2d traces will make them their x-bins and y-bins match separately.</param>
/// <param name="XBinGroup">Set a group of histogram traces which will have compatible x-bin settings. Using `xbingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible x-bin settings. Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup`</param>
/// <param name="XBins">Sets the binning across the x dimension</param>
/// <param name="YBinGroup">Set a group of histogram traces which will have compatible y-bin settings. Using `ybingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible y-bin settings. Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup`</param>
/// <param name="YBins">Sets the binning across the y dimension</param>
/// <param name="Marker">Sets the marker of this trace.</param>
/// <param name="ContourLinesDash">Sets the contour line dash style</param>
/// <param name="ContourLinesColor">Sets the contour line color</param>
/// <param name="ContourLinesSmoothing">Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing.</param>
/// <param name="ContourLinesWidth">Sets the width of the contour lines</param>
/// <param name="ContourLines">Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments).</param>
/// <param name="ShowContourLines">Wether or not to show the contour line</param>
/// <param name="ContoursColoring">Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace.</param>
/// <param name="ContoursOperation">Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms.</param>
/// <param name="ContoursType">If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters.</param>
/// <param name="ShowContoursLabels">Determines whether to label the contour lines with their values.</param>
/// <param name="ContoursLabelFont">Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`.</param>
/// <param name="ContoursStart">Sets the starting contour level value. Must be less than `contours.end`</param>
/// <param name="ContoursEnd">Sets the end contour level value. Must be more than `contours.start`</param>
/// <param name="Contours">Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments).</param>
/// <param name="ColorBar">Sets the styles of the colorbar for this trace.</param>
/// <param name="ColorScale">Sets the colorscale for this trace.</param>
/// <param name="ShowScale">Whether or not to show the colorscale/colorbar</param>
/// <param name="ReverseScale">Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color.</param>
/// <param name="NContours">Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of `ncontours`. Has an effect only if `autocontour` is "true" or if `contours.size` is missing.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Histogram2DContour
(
?X: seq<#IConvertible>,
?MultiX: seq<seq<#IConvertible>>,
?Y: seq<#IConvertible>,
?MultiY: seq<seq<#IConvertible>>,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?Z: seq<#seq<#IConvertible>>,
?HistFunc: StyleParam.HistFunc,
?HistNorm: StyleParam.HistNorm,
?NBinsX: int,
?NBinsY: int,
?BinGroup: string,
?XBinGroup: string,
?XBins: Bins,
?YBinGroup: string,
?YBins: Bins,
?Marker: Marker,
?ContourLinesColor: Color,
?ContourLinesDash: StyleParam.DrawingStyle,
?ContourLinesSmoothing: float,
?ContourLinesWidth: float,
?ContourLines: Line,
?ShowContourLines: bool,
?ContoursColoring: StyleParam.ContourColoring,
?ContoursOperation: StyleParam.ConstraintOperation,
?ContoursType: StyleParam.ContourType,
?ShowContoursLabels: bool,
?ContoursLabelFont: Font,
?ContoursStart: float,
?ContoursEnd: float,
?Contours: Contours,
?ColorBar: ColorBar,
?ColorScale: StyleParam.Colorscale,
?ShowScale: bool,
?ReverseScale: bool,
?NContours: int,
?UseDefaults: bool
) =
let useDefaults =
defaultArg UseDefaults true
let showContourLines =
defaultArg ShowContourLines false
let contourLineWidth =
ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0.
let contours =
Contours
|> Option.defaultValue (TraceObjects.Contours.init ())
|> TraceObjects.Contours.style (
?Coloring = ContoursColoring,
?Operation = ContoursOperation,
?Start = ContoursStart,
?End = ContoursEnd,
?Type = ContoursType,
?ShowLabels = ShowContoursLabels,
?LabelFont = ContoursLabelFont
)
let contourLines =
ContourLines
|> Option.defaultValue (Plotly.NET.Line.init ())
|> Plotly.NET.Line.style (
Width = contourLineWidth,
?Color = ContourLinesColor,
?Dash = ContourLinesDash,
?Smoothing = ContourLinesSmoothing
)
Trace2D.initHistogram2DContour (
Trace2DStyle.Histogram2DContour(
?X = X,
?MultiX = MultiX,
?Y = Y,
?MultiY = MultiY,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?Z = Z,
?HistFunc = HistFunc,
?HistNorm = HistNorm,
?NBinsX = NBinsX,
?NBinsY = NBinsY,
?BinGroup = BinGroup,
?XBinGroup = XBinGroup,
?XBins = XBins,
?YBinGroup = YBinGroup,
?YBins = YBins,
?Marker = Marker,
Line = contourLines,
?ColorBar = ColorBar,
?ColorScale = ColorScale,
?ShowScale = ShowScale,
?ReverseScale = ReverseScale,
Contours = contours,
?NContours = NContours
)
)
|> GenericChart.ofTraceObject useDefaults
/// <summary>
/// Computes a 2D histogram contour plot from encoded input data.
/// </summary>
/// <param name="xEncoded">Sets the sample data to be binned on the x axis as an encoded typed array.</param>
/// <param name="yEncoded">Sets the sample data to be binned on the y axis as an encoded typed array.</param>
/// <param name="zEncoded">Sets the aggregation data as an encoded typed array.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover.</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the Opacity otf the trace.</param>
/// <param name="HistFunc">Specifies the binning function used for this histogram trace.</param>
/// <param name="HistNorm">Specifies the type of normalization used for this histogram trace.</param>
/// <param name="NBinsX">Specifies the maximum number of desired bins.</param>
/// <param name="NBinsY">Specifies the maximum number of desired bins.</param>
/// <param name="BinGroup">Set the `xbingroup` and `ybingroup` default prefix.</param>
/// <param name="XBinGroup">Set a group of histogram traces which will have compatible x-bin settings.</param>
/// <param name="XBins">Sets the binning across the x dimension</param>
/// <param name="YBinGroup">Set a group of histogram traces which will have compatible y-bin settings.</param>
/// <param name="YBins">Sets the binning across the y dimension</param>
/// <param name="Marker">Sets the marker of this trace.</param>
/// <param name="ContourLinesDash">Sets the contour line dash style</param>
/// <param name="ContourLinesColor">Sets the contour line color</param>
/// <param name="ContourLinesSmoothing">Sets the amount of smoothing for the contour lines.</param>
/// <param name="ContourLinesWidth">Sets the width of the contour lines</param>
/// <param name="ContourLines">Sets the contour lines.</param>
/// <param name="ShowContourLines">Wether or not to show the contour line</param>
/// <param name="ContoursColoring">Determines the coloring method showing the contour values.</param>
/// <param name="ContoursOperation">Sets the constraint operation.</param>
/// <param name="ContoursType">Sets the contour representation type.</param>
/// <param name="ShowContoursLabels">Determines whether to label the contour lines with their values.</param>
/// <param name="ContoursLabelFont">Sets the font used for labeling the contour levels.</param>
/// <param name="ContoursStart">Sets the starting contour level value.</param>
/// <param name="ContoursEnd">Sets the end contour level value.</param>
/// <param name="Contours">Sets the styles of the contours.</param>
/// <param name="ColorBar">Sets the styles of the colorbar for this trace.</param>
/// <param name="ColorScale">Sets the colorscale for this trace.</param>
/// <param name="ShowScale">Whether or not to show the colorscale/colorbar</param>
/// <param name="ReverseScale">Reverses the color mapping if true.</param>
/// <param name="NContours">Sets the maximum number of contour levels.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Histogram2DContour
(
xEncoded: EncodedTypedArray,
yEncoded: EncodedTypedArray,
?zEncoded: EncodedTypedArray,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?HistFunc: StyleParam.HistFunc,
?HistNorm: StyleParam.HistNorm,
?NBinsX: int,
?NBinsY: int,
?BinGroup: string,
?XBinGroup: string,
?XBins: Bins,
?YBinGroup: string,
?YBins: Bins,
?Marker: Marker,
?ContourLinesColor: Color,
?ContourLinesDash: StyleParam.DrawingStyle,
?ContourLinesSmoothing: float,
?ContourLinesWidth: float,
?ContourLines: Line,
?ShowContourLines: bool,
?ContoursColoring: StyleParam.ContourColoring,
?ContoursOperation: StyleParam.ConstraintOperation,
?ContoursType: StyleParam.ContourType,
?ShowContoursLabels: bool,
?ContoursLabelFont: Font,
?ContoursStart: float,
?ContoursEnd: float,
?Contours: Contours,
?ColorBar: ColorBar,
?ColorScale: StyleParam.Colorscale,
?ShowScale: bool,
?ReverseScale: bool,
?NContours: int,
?UseDefaults: bool
) =
let useDefaults =
defaultArg UseDefaults true
let showContourLines =
defaultArg ShowContourLines false
let contourLineWidth =
ContourLinesWidth |> Option.map (fun v -> if showContourLines then v else 0.) |> Option.defaultValue 0.
let contours =
Contours
|> Option.defaultValue (TraceObjects.Contours.init ())
|> TraceObjects.Contours.style (
?Coloring = ContoursColoring,
?Operation = ContoursOperation,
?Start = ContoursStart,
?End = ContoursEnd,
?Type = ContoursType,
?ShowLabels = ShowContoursLabels,
?LabelFont = ContoursLabelFont
)
let contourLines =
ContourLines
|> Option.defaultValue (Plotly.NET.Line.init ())
|> Plotly.NET.Line.style (
Width = contourLineWidth,
?Color = ContourLinesColor,
?Dash = ContourLinesDash,
?Smoothing = ContourLinesSmoothing
)
Trace2D.initHistogram2DContour (
Trace2DStyle.Histogram2DContour(
XEncoded = xEncoded,
YEncoded = yEncoded,
?ZEncoded = zEncoded,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?HistFunc = HistFunc,
?HistNorm = HistNorm,
?NBinsX = NBinsX,
?NBinsY = NBinsY,
?BinGroup = BinGroup,
?XBinGroup = XBinGroup,
?XBins = XBins,
?YBinGroup = YBinGroup,
?YBins = YBins,
?Marker = Marker,
Line = contourLines,
?ColorBar = ColorBar,
?ColorScale = ColorScale,
?ShowScale = ShowScale,
?ReverseScale = ReverseScale,
Contours = contours,
?NContours = NContours
)
)
|> GenericChart.ofTraceObject useDefaults
/// <summary>
/// Computes a 2D histogram contour plot, also known as a density contour plot, which is a 2-dimensional generalization of a histogram which resembles a contour plot but is computed by grouping a set of points specified by their x and y coordinates into bins, and applying an aggregation function such as count or sum (if z is provided) to compute the value to be used to compute contours.
///
/// The sample data from which statistics are computed is set in `x` and `y` (where `x` and `y` represent marginal distributions, binning is set in `xbins` and `ybins` in this case) or `z` (where `z` represent the 2D distribution and binning set, binning is set by `x` and `y` in this case). The resulting distribution is visualized as a contour plot.
/// </summary>
/// <param name="x">Sets the sample data to be binned on the x axis.</param>
/// <param name="y">Sets the sample data to be binned on the y axis.</param>
/// <param name="Name">Sets the trace name. The trace name appear as the legend item and on hover.</param>
/// <param name="ShowLegend">Determines whether or not an item corresponding to this trace is shown in the legend.</param>
/// <param name="Opacity">Sets the Opacity otf the trace.</param>
/// <param name="Z">Sets the aggregation data.</param>
/// <param name="HistFunc">Specifies the binning function used for this histogram trace. If "count", the histogram values are computed by counting the number of values lying inside each bin. If "sum", "avg", "min", "max", the histogram values are computed using the sum, the average, the minimum or the maximum of the values lying inside each bin respectively.</param>
/// <param name="HistNorm">Specifies the type of normalization used for this histogram trace. If "", the span of each bar corresponds to the number of occurrences (i.e. the number of data points lying inside the bins). If "percent" / "probability", the span of each bar corresponds to the percentage / fraction of occurrences with respect to the total number of sample points (here, the sum of all bin HEIGHTS equals 100% / 1). If "density", the span of each bar corresponds to the number of occurrences in a bin divided by the size of the bin interval (here, the sum of all bin AREAS equals the total number of sample points). If "probability density", the area of each bar corresponds to the probability that an event will fall into the corresponding bin (here, the sum of all bin AREAS equals 1).</param>
/// <param name="NBinsX">Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `xbins.size` is provided.</param>
/// <param name="NBinsY">Specifies the maximum number of desired bins. This value will be used in an algorithm that will decide the optimal bin size such that the histogram best visualizes the distribution of the data. Ignored if `ybins.size` is provided.</param>
/// <param name="BinGroup">Set the `xbingroup` and `ybingroup` default prefix For example, setting a `bingroup` of "1" on two histogram2d traces will make them their x-bins and y-bins match separately.</param>
/// <param name="XBinGroup">Set a group of histogram traces which will have compatible x-bin settings. Using `xbingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible x-bin settings. Note that the same `xbingroup` value can be used to set (1D) histogram `bingroup`</param>
/// <param name="XBins">Sets the binning across the x dimension</param>
/// <param name="YBinGroup">Set a group of histogram traces which will have compatible y-bin settings. Using `ybingroup`, histogram2d and histogram2dcontour traces (on axes of the same axis type) can have compatible y-bin settings. Note that the same `ybingroup` value can be used to set (1D) histogram `bingroup`</param>
/// <param name="YBins">Sets the binning across the y dimension</param>
/// <param name="Marker">Sets the marker of this trace.</param>
/// <param name="ContourLinesDash">Sets the contour line dash style</param>
/// <param name="ContourLinesColor">Sets the contour line color</param>
/// <param name="ContourLinesSmoothing">Sets the amount of smoothing for the contour lines, where "0" corresponds to no smoothing.</param>
/// <param name="ContourLinesWidth">Sets the width of the contour lines</param>
/// <param name="ContourLines">Sets the contour lines (use this for more finegrained control than the other contourline-associated arguments).</param>
/// <param name="ShowContourLines">Wether or not to show the contour line</param>
/// <param name="ContoursColoring">Determines the coloring method showing the contour values. If "fill", coloring is done evenly between each contour level If "heatmap", a heatmap gradient coloring is applied between each contour level. If "lines", coloring is done on the contour lines. If "none", no coloring is applied on this trace.</param>
/// <param name="ContoursOperation">Sets the constraint operation. "=" keeps regions equal to `value` "<" and "<=" keep regions less than `value` ">" and ">=" keep regions greater than `value` "[]", "()", "[)", and "(]" keep regions inside `value[0]` to `value[1]` "][", ")(", "](", ")[" keep regions outside `value[0]` to value[1]` Open vs. closed intervals make no difference to constraint display, but all versions are allowed for consistency with filter transforms.</param>
/// <param name="ContoursType">If `levels`, the data is represented as a contour plot with multiple levels displayed. If `constraint`, the data is represented as constraints with the invalid region shaded as specified by the `operation` and `value` parameters.</param>
/// <param name="ShowContoursLabels">Determines whether to label the contour lines with their values.</param>
/// <param name="ContoursLabelFont">Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`.</param>
/// <param name="ContoursStart">Sets the starting contour level value. Must be less than `contours.end`</param>
/// <param name="ContoursEnd">Sets the end contour level value. Must be more than `contours.start`</param>
/// <param name="Contours">Sets the styles of the contours (use this for more finegrained control than the other contour-associated arguments).</param>
/// <param name="ColorBar">Sets the styles of the colorbar for this trace.</param>
/// <param name="ColorScale">Sets the colorscale for this trace.</param>
/// <param name="ShowScale">Whether or not to show the colorscale/colorbar</param>
/// <param name="ReverseScale">Reverses the color mapping if true. If true, `zmin` will correspond to the last color in the array and `zmax` will correspond to the first color.</param>
/// <param name="NContours">Sets the maximum number of contour levels. The actual number of contours will be chosen automatically to be less than or equal to the value of `ncontours`. Has an effect only if `autocontour` is "true" or if `contours.size` is missing.</param>
/// <param name="UseDefaults">If set to false, ignore the global default settings set in `Defaults`</param>
[<Extension>]
static member Histogram2DContour
(
x: seq<#IConvertible>,
y: seq<#IConvertible>,
?Name: string,
?ShowLegend: bool,
?Opacity: float,
?Z: seq<#seq<#IConvertible>>,
?HistFunc: StyleParam.HistFunc,
?HistNorm: StyleParam.HistNorm,
?NBinsX: int,
?NBinsY: int,
?BinGroup: string,
?XBinGroup: string,
?XBins: Bins,
?YBinGroup: string,
?YBins: Bins,
?Marker: Marker,
?ContourLinesColor: Color,
?ContourLinesDash: StyleParam.DrawingStyle,
?ContourLinesSmoothing: float,
?ContourLinesWidth: float,
?ContourLines: Line,
?ShowContourLines: bool,
?ContoursColoring: StyleParam.ContourColoring,
?ContoursOperation: StyleParam.ConstraintOperation,
?ContoursType: StyleParam.ContourType,
?ShowContoursLabels: bool,
?ContoursLabelFont: Font,
?ContoursStart: float,
?ContoursEnd: float,
?Contours: Contours,
?ColorBar: ColorBar,
?ColorScale: StyleParam.Colorscale,
?ShowScale: bool,
?ReverseScale: bool,
?NContours: int,
?UseDefaults: bool
) =
Chart.Histogram2DContour(
X = x,
Y = y,
?Name = Name,
?ShowLegend = ShowLegend,
?Opacity = Opacity,
?Z = Z,
?HistFunc = HistFunc,
?HistNorm = HistNorm,
?NBinsX = NBinsX,
?NBinsY = NBinsY,
?BinGroup = BinGroup,
?XBinGroup = XBinGroup,
?XBins = XBins,
?YBinGroup = YBinGroup,
?YBins = YBins,
?Marker = Marker,
?ContourLinesColor = ContourLinesColor,
?ContourLinesDash = ContourLinesDash,
?ContourLinesSmoothing = ContourLinesSmoothing,
?ContourLinesWidth = ContourLinesWidth,
?ContourLines = ContourLines,
?ShowContourLines= ShowContourLines,
?ContoursColoring = ContoursColoring,
?ContoursOperation = ContoursOperation,
?ContoursType = ContoursType,
?ShowContoursLabels = ShowContoursLabels,
?ContoursLabelFont = ContoursLabelFont,
?ContoursStart = ContoursStart,
?ContoursEnd = ContoursEnd,
?Contours = Contours,
?ColorBar = ColorBar,
?ColorScale = ColorScale,
?ShowScale = ShowScale,
?ReverseScale = ReverseScale,
?NContours = NContours,
?UseDefaults = UseDefaults
)