XPlot


Plotly Heatmaps

Basic Heatmap

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
let basicData =
    Data(
        [
            Heatmap(
                z = [[1; 20; 30]; [20; 1; 60]; [30; 60; 1]]
            )
        ]
    )

let basicLayout = Layout(title = "Basic Heatmap")

Figure(basicData, basicLayout)

Heatmap with Categorical Axis Labels

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
let categoricalData =
    Data(
        [
            Heatmap(
                z = [[1; 20; 30; 50; 1]; [20; 1; 60; 80; 30]; [30; 60; 1; -10; 20]],
                x = ["Monday"; "Tuesday"; "Wednesday"; "Thursday"; "Friday"],
                y = ["Morning"; "Afternoon"; "Evening"]
            )
        ]
    )

let categoricalLayout = Layout(title = "Heatmap with Categorical Axis Labels")

Figure(categoricalData, categoricalLayout)

Custom Colorscale

 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 customZ =
    [
        for x in 1 .. 50 do
            let lst = List.map (fun y -> y + x) [1..50]
            yield lst
    ]

let colorScale =
    [
        [box 0.0; box "rgb(165,0,38)"]
        [0.1111111111111111; "rgb(215,48,39)"]
        [0.2222222222222222; "rgb(244,109,67)"]
        [0.3333333333333333; "rgb(253,174,97)"]
        [0.4444444444444444; "rgb(254,224,144)"]
        [0.5555555555555556; "rgb(224,243,248)"]
        [0.6666666666666666; "rgb(171,217,233)"]
        [0.7777777777777778; "rgb(116,173,209)"]
        [0.8888888888888888; "rgb(69,117,180)"]
        [1.0; "rgb(49,54,149)"]
    ]

let customData =
    Data(
        [
            Heatmap(
                z = customZ,
                colorscale = colorScale
            )
        ]
    )

let customLayout = Layout(title = "Custom Colorscale")

Figure(customData, customLayout)

Earth Colorscale

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
let earthZ =
    [
        for x in 1 .. 50 ->
            List.map (fun y -> y + x) [1..50]
    ]

let earthData =
    Data(
        [
            Heatmap(
                z = earthZ,
                colorscale = "Earth"
            )
        ]
    )

let earthLayout = Layout(title = "Earth Colorscale")

Figure(earthData, earthLayout)

YIGnBu Colorscale

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
19: 
let yignbuZ =
    [
        for x in 1 .. 50 ->
            List.map (fun y -> y + x) [1..50]
    ]

let yignbuData =
    Data(
        [
            Heatmap(
                z = yignbuZ,
                colorscale = "YIGnBu"
            )
        ]
    )

let yignbuLayout = Layout(title = "YIGnBu Colorscale")

Figure(yignbuData, yignbuLayout)
namespace XPlot
namespace XPlot.Plotly
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 basicData : Data

Full name: Plotly-heatmaps.basicData
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 Heatmap =
  inherit Trace
  new : unit -> Heatmap
  member ShouldSerializecolorbar : unit -> bool
  member ShouldSerializecolorscale : unit -> bool
  member ShouldSerializeconnectgaps : unit -> bool
  member ShouldSerializedx : unit -> bool
  member ShouldSerializedy : unit -> bool
  member ShouldSerializename : unit -> bool
  member ShouldSerializeopacity : unit -> bool
  member ShouldSerializereversescale : unit -> bool
  ...

Full name: XPlot.Plotly.Graph.Heatmap

--------------------
new : unit -> Heatmap
property Heatmap.z: obj
val basicLayout : Layout

Full name: Plotly-heatmaps.basicLayout
Multiple items
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 ShouldSerializebarnorm : unit -> bool
  member ShouldSerializeboxgap : unit -> bool
  member ShouldSerializeboxgroupgap : unit -> bool
  ...

Full name: XPlot.Plotly.Graph.Layout

--------------------
new : unit -> Layout
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 categoricalData : Data

Full name: Plotly-heatmaps.categoricalData
property Heatmap.x: obj
property Heatmap.y: obj
val categoricalLayout : Layout

Full name: Plotly-heatmaps.categoricalLayout
val customZ : int list list

Full name: Plotly-heatmaps.customZ
val x : int
val lst : int list
Multiple items
module List

from Microsoft.FSharp.Collections

--------------------
type List<'T> =
  | ( [] )
  | ( :: ) of Head: 'T * Tail: 'T list
  interface IEnumerable
  interface IEnumerable<'T>
  member Head : 'T
  member IsEmpty : bool
  member Item : index:int -> 'T with get
  member Length : int
  member Tail : 'T list
  static member Cons : head:'T * tail:'T list -> 'T list
  static member Empty : 'T list

Full name: Microsoft.FSharp.Collections.List<_>
val map : mapping:('T -> 'U) -> list:'T list -> 'U list

Full name: Microsoft.FSharp.Collections.List.map
val y : int
val colorScale : obj list list

Full name: Plotly-heatmaps.colorScale
val box : value:'T -> obj

Full name: Microsoft.FSharp.Core.Operators.box
val customData : Data

Full name: Plotly-heatmaps.customData
val customLayout : Layout

Full name: Plotly-heatmaps.customLayout
val earthZ : int list list

Full name: Plotly-heatmaps.earthZ
val earthData : Data

Full name: Plotly-heatmaps.earthData
val earthLayout : Layout

Full name: Plotly-heatmaps.earthLayout
val yignbuZ : int list list

Full name: Plotly-heatmaps.yignbuZ
val yignbuData : Data

Full name: Plotly-heatmaps.yignbuData
val yignbuLayout : Layout

Full name: Plotly-heatmaps.yignbuLayout
Fork me on GitHub