XPlot


Plotly 2D Histograms

2D Histogram of a Bivariate Normal Distribution

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
let data =
    Data(
        [
            Histogram2d(
                x = x,
                y = y
            )
        ]
    )

Figure(data)

2D Histogram Binning and Styling Options

 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: 
let data' =
    Data(
        [
            Histogram2d(
                x = x,
                y = y,
                histnorm = "probability",
                autobinx = false,
                xbins =
                    XBins(
                        start = -3.,
                        ``end`` = 3.,
                        size = 0.1
                    ),
                autobiny = false,
                ybins =
                    YBins(
                        start = -2.5,
                        ``end`` = 4.,
                        size = 0.1
                    ),
                colorscale =
                    [
                        [box 0; box "rgb(12,51,131)"]
                        [0.25; "rgb(10,136,186)"]
                        [0.5; "rgb(242,211,56)"]
                        [0.75; "rgb(242,143,56)"]
                        [1; "rgb(217,30,30)"]
                    ]
            )
        ]
    )

Figure(data')

2D Histogram Overlaid with a Scatter Chart

 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: 
let trace1 =
    Scatter(
        x = x0,
        y = y0,
        mode = "markers",
        marker =
            Marker(
                symbol = "circle",
                opacity = 0.7
            )
    )

let trace2 =
    Scatter(
        x = x1,
        y = y1,
        mode = "markers",
        marker =
            Marker(
                symbol = "square",
                opacity = 0.7
            )
    )

let trace3 =
    Histogram2d(
        x = x',
        y = y'
    )

let data'' = Data([trace1; trace2; trace3])

Figure(data'')
namespace XPlot
namespace XPlot.Plotly
namespace MathNet
namespace MathNet.Numerics
namespace MathNet.Numerics.Distributions
type Plotly =
  private new : unit -> Plotly
  static member Signin : username:string * password:string -> unit

Full name: XPlot.Plotly.Plotly
static member Plotly.Signin : username:string * password:string -> unit
module MyCredentials
val userAndKey : string * string

Full name: MyCredentials.userAndKey
val normal : Normal

Full name: Plotly-2d-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 x : seq<float>

Full name: Plotly-2d-histograms.x
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 y : seq<float>

Full name: Plotly-2d-histograms.y
val map : mapping:('T -> 'U) -> source:seq<'T> -> seq<'U>

Full name: Microsoft.FSharp.Collections.Seq.map
val x : float
val x0 : seq<float>

Full name: Plotly-2d-histograms.x0
val y0 : seq<float>

Full name: Plotly-2d-histograms.y0
val uniform : ContinuousUniform

Full name: Plotly-2d-histograms.uniform
Multiple items
type ContinuousUniform =
  new : unit -> ContinuousUniform + 2 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 LowerBound : float
  member Maximum : float
  member Mean : float
  member Median : float
  ...

Full name: MathNet.Numerics.Distributions.ContinuousUniform

--------------------
ContinuousUniform() : unit
ContinuousUniform(lower: float, upper: float) : unit
ContinuousUniform(lower: float, upper: float, randomSource: System.Random) : unit
val x1 : seq<float>

Full name: Plotly-2d-histograms.x1
ContinuousUniform.Samples() : System.Collections.Generic.IEnumerable<float>
ContinuousUniform.Samples(values: float []) : unit
val y1 : seq<float>

Full name: Plotly-2d-histograms.y1
val x' : seq<float>

Full name: Plotly-2d-histograms.x'
val concat : sources:seq<#seq<'T>> -> seq<'T>

Full name: Microsoft.FSharp.Collections.Seq.concat
val y' : seq<float>

Full name: Plotly-2d-histograms.y'
val data : Data

Full name: Plotly-2d-histograms.data
Multiple items
namespace Microsoft.FSharp.Data

--------------------
type Data =
  new : traces:seq<Trace> -> Data
  member Json : string
  static member From : traces:seq<#Trace> -> Data

Full name: XPlot.Plotly.Data

--------------------
new : traces:seq<Trace> -> Data
Multiple items
type Histogram2d =
  inherit Trace
  new : unit -> Histogram2d
  member ShouldSerializeautobinx : unit -> bool
  member ShouldSerializeautobiny : unit -> bool
  member ShouldSerializecolorbar : unit -> bool
  member ShouldSerializecolorscale : unit -> bool
  member ShouldSerializehistfunc : unit -> bool
  member ShouldSerializehistnorm : unit -> bool
  member ShouldSerializename : unit -> bool
  member ShouldSerializenbinsx : unit -> bool
  ...

Full name: XPlot.Plotly.Graph.Histogram2d

--------------------
new : unit -> Histogram2d
property Histogram2d.x: obj
property Histogram2d.y: obj
Multiple items
type Figure =
  new : data:Data * ?Layout:Layout -> Figure
  member GetInlineHtml : filename:string -> string
  member Plot : filename:string -> PlotlyResponse option
  member Fileopt : string
  member Height : int
  member Layout : Layout option
  member Origin : string
  member Response : PlotlyResponse option
  member Width : int
  member Fileopt : string with set
  ...

Full name: XPlot.Plotly.Figure

--------------------
new : data:Data * ?Layout:Layout -> Figure
val data' : Data

Full name: Plotly-2d-histograms.data'
Multiple items
type XBins =
  new : unit -> XBins
  member ShouldSerializeend : unit -> bool
  member ShouldSerializesize : unit -> bool
  member ShouldSerializestart : unit -> bool
  member end : float
  member size : float
  member start : float
  member end : float with set
  member size : float with set
  member start : float with set

Full name: XPlot.Plotly.Graph.XBins

--------------------
new : unit -> XBins
Multiple items
type YBins =
  new : unit -> YBins
  member ShouldSerializeend : unit -> bool
  member ShouldSerializesize : unit -> bool
  member ShouldSerializestart : unit -> bool
  member end : float
  member size : float
  member start : float
  member end : float with set
  member size : float with set
  member start : float with set

Full name: XPlot.Plotly.Graph.YBins

--------------------
new : unit -> YBins
val box : value:'T -> obj

Full name: Microsoft.FSharp.Core.Operators.box
val trace1 : Scatter

Full name: Plotly-2d-histograms.trace1
Multiple items
type Scatter =
  inherit Trace
  new : unit -> Scatter
  member ShouldSerializeconnectgaps : unit -> bool
  member ShouldSerializeerror_x : unit -> bool
  member ShouldSerializeerror_y : unit -> bool
  member ShouldSerializefill : unit -> bool
  member ShouldSerializefillcolor : unit -> bool
  member ShouldSerializeline : unit -> bool
  member ShouldSerializemarker : unit -> bool
  member ShouldSerializemode : unit -> bool
  ...

Full name: XPlot.Plotly.Graph.Scatter

--------------------
new : unit -> Scatter
property Scatter.x: obj
property Scatter.y: obj
Multiple items
type Marker =
  new : unit -> Marker
  member ShouldSerializecauto : unit -> bool
  member ShouldSerializecmax : unit -> bool
  member ShouldSerializecmin : unit -> bool
  member ShouldSerializecolor : unit -> bool
  member ShouldSerializecolorscale : unit -> bool
  member ShouldSerializeline : unit -> bool
  member ShouldSerializemaxdisplayed : unit -> bool
  member ShouldSerializeopacity : unit -> bool
  member ShouldSerializeoutliercolor : unit -> bool
  ...

Full name: XPlot.Plotly.Graph.Marker

--------------------
new : unit -> Marker
val trace2 : Scatter

Full name: Plotly-2d-histograms.trace2
val trace3 : Histogram2d

Full name: Plotly-2d-histograms.trace3
val data'' : Data

Full name: Plotly-2d-histograms.data''
Fork me on GitHub