XPlot


Plotly Bubble Charts

Binder

Marker Size, Color, and Symbol as an Array

open XPlot.Plotly

let trace1 =
    Scatter(
        x = [1; 2; 3; 4],
        y = [10; 11; 12; 13],
        mode = "markers",
        marker =
            Marker(
                color = ["hsl(0,100,40)"; "hsl(33,100,40)"; "hsl(66,100,40)"; "hsl(99,100,40)"],
                size = [12; 22; 32; 42],
                opacity = [0.6, 0.7, 0.8, 0.9]
            )
    )

let trace2 =
    Scatter(
        x = [1; 2; 3; 4],
        y = [11; 12; 13; 14],
        mode = "markers",
        marker =
            Marker(
                color = "rgb(31, 119, 180)",
                size = 18,
                symbol = ["circle"; "square"; "diamond"; "cross"]
            )
    )

let trace3 =
    Scatter(
        x = [1; 2; 3; 4],
        y = [12; 13; 14; 15],
        mode = "markers",
        marker =
            Marker(
                size = 18,
                line =
                    Line(
                        color = ["rgb(120,120,120)"; "rgb(120,120,120)"; "red"; "rgb(120,120,120)"],
                        width = [2; 2; 6; 2]
                    )
            )
    )

let chart =
    [trace1; trace2; trace3]
    |> Chart.Plot
    |> Chart.WithWidth 700
    |> Chart.WithHeight 500
namespace XPlot
namespace XPlot.Plotly
val trace1 : Scatter
Multiple items
type Scatter =
  inherit Trace
  new : unit -> Scatter
  member ShouldSerializeconnectgaps : unit -> bool
  member ShouldSerializedx : unit -> bool
  member ShouldSerializedy : unit -> bool
  member ShouldSerializeerror_x : unit -> bool
  member ShouldSerializeerror_y : unit -> bool
  member ShouldSerializefill : unit -> bool
  member ShouldSerializefillcolor : unit -> bool
  member ShouldSerializehoverinfo : unit -> bool
  ...

--------------------
new : unit -> Scatter
property Scatter.x: obj with get, set
property Scatter.y: obj with get, set
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
  ...

--------------------
new : unit -> Marker
val trace2 : Scatter
val trace3 : Scatter
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
  ...

--------------------
new : unit -> Line
val chart : PlotlyChart
type Chart =
  static member Area : data:seq<#value> -> PlotlyChart + 2 overloads
  static member Bar : data:seq<#value> -> PlotlyChart + 2 overloads
  static member Bubble : data:seq<#key * #value * #value> -> PlotlyChart
  static member Candlestick : data:seq<#key * #value * #value * #value * #value> -> PlotlyChart
  static member Column : data:seq<#value> -> PlotlyChart + 2 overloads
  static member Line : data:seq<#value> -> PlotlyChart + 2 overloads
  static member Pie : data:seq<#key * #value> -> PlotlyChart
  static member Plot : data:Trace -> PlotlyChart + 3 overloads
  static member Scatter : data:seq<#value> -> PlotlyChart + 2 overloads
  static member Show : chart:PlotlyChart -> unit
  ...
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
member PlotlyChart.GetHtml : unit -> string