XPlot


Plotly Histograms

Full source

Basic Histogram

1: 
2: 
3: 
4: 
Histogram(x = basicX)
|> Chart.Plot
|> Chart.WithWidth 700
|> Chart.WithHeight 500

Horizontal Histogram

1: 
2: 
3: 
4: 
5: 
6: 
7: 
let horizontalLayout = Layout(title = "Horizontal Histogram")
       
Histogram(y = horizontalY)
|> Chart.Plot
|> Chart.WithLayout horizontalLayout
|> Chart.WithWidth 700
|> Chart.WithHeight 500

Overlaid Histogram

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
20: 
21: 
22: 
23: 
let overlaidTrace1 =
    Histogram(
        x = overlaidX0,
        opacity = 0.75
    )

let overlaidTrace2 =
    Histogram(
        x = overlaidX1,
        opacity = 0.75
    )

let overlaidLayout =
    Layout(
        barmode = "overlay",
        title = "Overlaid Histogram"
    )

[overlaidTrace1; overlaidTrace2]
|> Chart.Plot
|> Chart.WithLayout overlaidLayout
|> Chart.WithWidth 700
|> Chart.WithHeight 500

Stacked Histograms

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
let stackedTrace1 = Histogram(x = stackedX0)

let stackedTrace2 = Histogram(x = stackedX1)

let stackedLayout =
    Layout(
        barmode = "stack",
        title = "Stacked Histograms"
    )

[stackedTrace1; stackedTrace2]
|> Chart.Plot
|> Chart.WithLayout stackedLayout
|> Chart.WithWidth 700
|> Chart.WithHeight 500

Colored and Styled Histograms

 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: 
let coloredTrace1 =
    Histogram(
        x = coloredX0,
        histnorm = "count",
        name = "control",
        autobinx = false,
        xbins =
            Xbins(
                start = -3.2,
                ``end`` = 2.8,
                size = 0.2
            ),
        marker =
            Marker(
                color = "fuchsia",
                line =
                    Line(
                        color = "grey",
                        width = 0
                    ),
                opacity = 0.75
            )
    )

let coloredTrace2 =
    Histogram(
        x = coloredX1,
        name = "experimental",
        autobinx = false,
        xbins =
            Xbins(
                start = -1.8,
                ``end`` = 4.2,
                size = 0.2
            ),
        marker = Marker(color = "rgb(255, 217, 102)"),
        opacity = 0.75
    )

let coloredLayout =
    Layout(
        title = "Colored and Styled Histograms",
        xaxis = Xaxis(title = "Value"),
        yaxis = Yaxis(title = "Count"),
        barmode = "overlay",
        bargap = 0.25,
        bargroupgap = 0.3
    )

[coloredTrace1; coloredTrace2]
|> Chart.Plot
|> Chart.WithLayout coloredLayout
|> Chart.WithWidth 700
|> Chart.WithHeight 500
namespace XPlot
namespace XPlot.Plotly
namespace MathNet
namespace MathNet.Numerics
namespace MathNet.Numerics.Distributions
val normal : Normal

Full name: Plotly-histograms.normal
Multiple items
type Normal =
  new : unit -> Normal + 3 overloads
  member CumulativeDistribution : x:float -> float
  member Density : x:float -> float
  member DensityLn : x:float -> float
  member Entropy : float
  member InverseCumulativeDistribution : p:float -> float
  member Maximum : float
  member Mean : float
  member Median : float
  member Minimum : float
  ...

Full name: MathNet.Numerics.Distributions.Normal

--------------------
Normal() : unit
Normal(randomSource: System.Random) : unit
Normal(mean: float, stddev: float) : unit
Normal(mean: float, stddev: float, randomSource: System.Random) : unit
val basicX : float []

Full name: Plotly-histograms.basicX
Normal.Samples() : System.Collections.Generic.IEnumerable<float>
Normal.Samples(values: float []) : unit
module Seq

from Microsoft.FSharp.Collections
val take : count:int -> source:seq<'T> -> seq<'T>

Full name: Microsoft.FSharp.Collections.Seq.take
val toArray : source:seq<'T> -> 'T []

Full name: Microsoft.FSharp.Collections.Seq.toArray
val horizontalY : float []

Full name: Plotly-histograms.horizontalY
val overlaidX0 : float []

Full name: Plotly-histograms.overlaidX0
val overlaidX1 : float []

Full name: Plotly-histograms.overlaidX1
module Array

from Microsoft.FSharp.Collections
val map : mapping:('T -> 'U) -> array:'T [] -> 'U []

Full name: Microsoft.FSharp.Collections.Array.map
val x : float
val stackedX0 : float []

Full name: Plotly-histograms.stackedX0
val stackedX1 : float []

Full name: Plotly-histograms.stackedX1
val coloredX0 : float []

Full name: Plotly-histograms.coloredX0
val coloredX1 : float []

Full name: Plotly-histograms.coloredX1
Multiple items
type Histogram =
  inherit Trace
  new : unit -> Histogram
  member ShouldSerializeautobinx : unit -> bool
  member ShouldSerializeautobiny : unit -> bool
  member ShouldSerializedx : unit -> bool
  member ShouldSerializedy : unit -> bool
  member ShouldSerializeerror_x : unit -> bool
  member ShouldSerializeerror_y : unit -> bool
  member ShouldSerializehistfunc : unit -> bool
  member ShouldSerializehistnorm : unit -> bool
  ...

Full name: XPlot.Plotly.Graph.Histogram

--------------------
new : unit -> Histogram
property Histogram.x: obj
type Chart =
  static member Area : data:seq<#seq<'a1 * 'a2>> -> PlotlyChart (requires 'a1 :> key and 'a2 :> value)
  static member Area : data:seq<#key * #value> -> PlotlyChart
  static member Area : data:seq<#value> -> PlotlyChart
  static member Bar : data:seq<#seq<'a1 * 'a2>> -> PlotlyChart (requires 'a1 :> key and 'a2 :> value)
  static member Bar : data:seq<#key * #value> -> PlotlyChart
  static member Bar : data:seq<#value> -> PlotlyChart
  static member Bubble : data:seq<#key * #value * #value> -> PlotlyChart
  static member Column : data:seq<#seq<'a1 * 'a2>> -> PlotlyChart (requires 'a1 :> key and 'a2 :> value)
  static member Column : data:seq<#key * #value> -> PlotlyChart
  static member Column : data:seq<#value> -> PlotlyChart
  ...

Full name: XPlot.Plotly.Chart
static member Chart.Plot : data:seq<#Trace> -> PlotlyChart
static member Chart.Plot : data:Trace -> PlotlyChart
static member Chart.Plot : data:seq<#Trace> * layout:Layout -> PlotlyChart
static member Chart.Plot : data:Trace * layout:Layout -> PlotlyChart
static member Chart.WithWidth : width:int -> chart:PlotlyChart -> PlotlyChart
static member Chart.WithHeight : height:int -> chart:PlotlyChart -> PlotlyChart
val horizontalLayout : Layout

Full name: Plotly-histograms.horizontalLayout
Multiple items
module Layout

from XPlot.Plotly

--------------------
type Layout =
  new : unit -> Layout
  member ShouldSerializeangularaxis : unit -> bool
  member ShouldSerializeannotations : unit -> bool
  member ShouldSerializeautosize : unit -> bool
  member ShouldSerializebargap : unit -> bool
  member ShouldSerializebargroupgap : unit -> bool
  member ShouldSerializebarmode : unit -> bool
  member ShouldSerializeboxmode : unit -> bool
  member ShouldSerializedirection : unit -> bool
  member ShouldSerializedragmode : unit -> bool
  ...

Full name: XPlot.Plotly.Layout.Layout

--------------------
new : unit -> Layout
property Histogram.y: obj
static member Chart.WithLayout : layout:Layout -> chart:PlotlyChart -> PlotlyChart
val overlaidTrace1 : Histogram

Full name: Plotly-histograms.overlaidTrace1
val overlaidTrace2 : Histogram

Full name: Plotly-histograms.overlaidTrace2
val overlaidLayout : Layout

Full name: Plotly-histograms.overlaidLayout
val stackedTrace1 : Histogram

Full name: Plotly-histograms.stackedTrace1
val stackedTrace2 : Histogram

Full name: Plotly-histograms.stackedTrace2
val stackedLayout : Layout

Full name: Plotly-histograms.stackedLayout
val coloredTrace1 : Histogram

Full name: Plotly-histograms.coloredTrace1
Multiple items
type Xbins =
  new : unit -> Xbins
  member ShouldSerializeend : unit -> bool
  member ShouldSerializesize : unit -> bool
  member ShouldSerializestart : unit -> bool
  member end : float
  member size : obj
  member start : float
  member end : float with set
  member size : obj with set
  member start : float with set

Full name: XPlot.Plotly.Graph.Xbins

--------------------
new : unit -> Xbins
Multiple items
type Marker =
  new : unit -> Marker
  member ShouldSerializeautocolorscale : unit -> bool
  member ShouldSerializecauto : unit -> bool
  member ShouldSerializecmax : unit -> bool
  member ShouldSerializecmin : unit -> bool
  member ShouldSerializecolor : unit -> bool
  member ShouldSerializecolorbar : unit -> bool
  member ShouldSerializecolors : unit -> bool
  member ShouldSerializecolorscale : unit -> bool
  member ShouldSerializecolorsrc : unit -> bool
  ...

Full name: XPlot.Plotly.Graph.Marker

--------------------
new : unit -> Marker
Multiple items
type Line =
  new : unit -> Line
  member ShouldSerializeautocolorscale : unit -> bool
  member ShouldSerializecauto : unit -> bool
  member ShouldSerializecmax : unit -> bool
  member ShouldSerializecmin : unit -> bool
  member ShouldSerializecolor : unit -> bool
  member ShouldSerializecolorscale : unit -> bool
  member ShouldSerializecolorsrc : unit -> bool
  member ShouldSerializedash : unit -> bool
  member ShouldSerializeoutliercolor : unit -> bool
  ...

Full name: XPlot.Plotly.Graph.Line

--------------------
new : unit -> Line
val coloredTrace2 : Histogram

Full name: Plotly-histograms.coloredTrace2
val coloredLayout : Layout

Full name: Plotly-histograms.coloredLayout
Multiple items
type Xaxis =
  new : unit -> Xaxis
  member ShouldSerialize_isSubplotObj : unit -> bool
  member ShouldSerializeanchor : unit -> bool
  member ShouldSerializeautorange : unit -> bool
  member ShouldSerializeautotick : unit -> bool
  member ShouldSerializebackgroundcolor : unit -> bool
  member ShouldSerializedomain : unit -> bool
  member ShouldSerializedtick : unit -> bool
  member ShouldSerializeexponentformat : unit -> bool
  member ShouldSerializefixedrange : unit -> bool
  ...

Full name: XPlot.Plotly.Graph.Xaxis

--------------------
new : unit -> Xaxis
Multiple items
type Yaxis =
  new : unit -> Yaxis
  member ShouldSerialize_isSubplotObj : unit -> bool
  member ShouldSerializeanchor : unit -> bool
  member ShouldSerializeautorange : unit -> bool
  member ShouldSerializeautotick : unit -> bool
  member ShouldSerializebackgroundcolor : unit -> bool
  member ShouldSerializedomain : unit -> bool
  member ShouldSerializedtick : unit -> bool
  member ShouldSerializeexponentformat : unit -> bool
  member ShouldSerializefixedrange : unit -> bool
  ...

Full name: XPlot.Plotly.Graph.Yaxis

--------------------
new : unit -> Yaxis
Fork me on GitHub