XPlot


Plotly Heatmaps

Full source

Basic Heatmap

1: 
2: 
3: 
4: 
5: 
6: 
7: 
8: 
9: 
let layout = Layout(title = "Basic Heatmap")

Heatmap(
    z = [[1; 20; 30]; [20; 1; 60]; [30; 60; 1]]
)
|> Chart.Plot
|> Chart.WithLayout layout
|> Chart.WithWidth 700
|> Chart.WithHeight 500

Heatmap with Categorical Axis Labels

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
let categoricalLayout = Layout(title = "Heatmap with Categorical Axis Labels")

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"]
)
|> Chart.Plot
|> Chart.WithLayout categoricalLayout
|> Chart.WithWidth 700
|> Chart.WithHeight 500

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: 
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 customLayout = Layout(title = "Custom Colorscale")

Heatmap(
    z = customZ,
    colorscale = colorScale
)
|> Chart.Plot
|> Chart.WithLayout customLayout
|> Chart.WithWidth 700
|> Chart.WithHeight 500

Earth Colorscale

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

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

Heatmap(
    z = earthZ,
    colorscale = "Earth"
)
|> Chart.Plot
|> Chart.WithLayout earthLayout
|> Chart.WithWidth 700
|> Chart.WithHeight 500

YIGnBu Colorscale

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

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

Heatmap(
    z = yignbuZ,
    colorscale = "YIGnBu"
)
|> Chart.Plot
|> Chart.WithLayout yignbuLayout
|> Chart.WithWidth 700
|> Chart.WithHeight 500
namespace XPlot
namespace XPlot.Plotly
val layout : Layout

Full name: Plotly-heatmaps.layout
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
Multiple items
type Heatmap =
  inherit Trace
  new : unit -> Heatmap
  member ShouldSerializeautocolorscale : unit -> bool
  member ShouldSerializecolorbar : unit -> bool
  member ShouldSerializecolorscale : unit -> bool
  member ShouldSerializeconnectgaps : unit -> bool
  member ShouldSerializedx : unit -> bool
  member ShouldSerializedy : unit -> bool
  member ShouldSerializehoverinfo : unit -> bool
  member ShouldSerializelegendgroup : unit -> bool
  ...

Full name: XPlot.Plotly.Graph.Heatmap

--------------------
new : unit -> Heatmap
property Heatmap.z: 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.WithLayout : layout:Layout -> chart:PlotlyChart -> PlotlyChart
static member Chart.WithWidth : width:int -> chart:PlotlyChart -> PlotlyChart
static member Chart.WithHeight : height:int -> chart:PlotlyChart -> PlotlyChart
val categoricalLayout : Layout

Full name: Plotly-heatmaps.categoricalLayout
property Heatmap.x: obj
property Heatmap.y: obj
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 GetSlice : startIndex:int option * endIndex:int option -> 'T list
  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 customLayout : Layout

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

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

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

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

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