Chart.Venn compares two or three sets of string identifiers. Each region shows the number
of members that belong to exactly that combination of sets. Duplicate identifiers within a
set are ignored.
The circles have fixed sizes: their areas do not represent set or intersection sizes.
Read the region counts to compare membership. For more than three sets, use an
UpSet plot.
The sets below share identifiers "3" and "4". The overlap therefore contains two members,
and each set also has two members outside the overlap.
open Plotly.NET
let setA = [ "1"; "2"; "3"; "4" ]
let setB = [ "3"; "4"; "5"; "6" ]
let twoSets =
Chart.Venn(
set1 = setA,
set2 = setB,
Label1 = "A",
Label2 = "B"
)
|> Chart.withSize (640, 440)
Pass Set3 to add a third set. In this example all seven regions contain members:
the center contains "1", which belongs to all three sets. The pairwise regions exclude
that shared member; for example, the A-and-B-only region contains "2" and "3".
Give each set a distinct label. Colors takes one color per set, in input order, and
TextFont controls the region-count text. The chart preserves a 1:1 axis scale so the
circles stay round when its dimensions change.
let threeSets =
Chart.Venn(
set1 = [ "1"; "2"; "3"; "4"; "5"; "6"; "11" ],
set2 = [ "1"; "2"; "3"; "7"; "8"; "9"; "10"; "12"; "13" ],
Set3 = [ "1"; "4"; "5"; "6"; "7"; "8"; "9"; "10"; "14"; "15"; "16" ],
Label1 = "A",
Label2 = "B",
Label3 = "C",
Colors = [ Color.fromHex "#247BA0"; Color.fromHex "#F25F5C"; Color.fromHex "#70C1B3" ],
TextFont = Font.init(Family = StyleParam.FontFamily.Arial, Size = 18.)
)
|> Chart.withSize (640, 500)
namespace Plotly
namespace Plotly.NET
module Defaults
from Plotly.NET
<summary>
Contains mutable global default values.
Changing these values will apply the default values to all consecutive Chart generations.
</summary>
val mutable DefaultDisplayOptions: Plotly.NET.DisplayOptions
Multiple items
type DisplayOptions =
inherit DynamicObj
new: unit -> DisplayOptions
static member addAdditionalHeadTags: additionalHeadTags: XmlNode list -> (DisplayOptions -> DisplayOptions)
static member addChartDescription: description: XmlNode list -> (DisplayOptions -> DisplayOptions)
static member combine: first: DisplayOptions -> second: DisplayOptions -> DisplayOptions
static member getAdditionalHeadTags: displayOpts: DisplayOptions -> XmlNode list
static member getChartDescription: displayOpts: DisplayOptions -> XmlNode list
static member getDocumentCharset: displayOpts: DisplayOptions -> string
static member getDocumentDescription: displayOpts: DisplayOptions -> string
static member getDocumentFavicon: displayOpts: DisplayOptions -> XmlNode
...
--------------------
new: unit -> Plotly.NET.DisplayOptions
static member Plotly.NET.DisplayOptions.init: ?DocumentTitle: string * ?DocumentCharset: string * ?DocumentDescription: string * ?DocumentFavicon: Giraffe.ViewEngine.HtmlElements.XmlNode * ?AdditionalHeadTags: Giraffe.ViewEngine.HtmlElements.XmlNode list * ?ChartDescription: Giraffe.ViewEngine.HtmlElements.XmlNode list * ?PlotlyJSReference: Plotly.NET.PlotlyJSReference -> Plotly.NET.DisplayOptions
type PlotlyJSReference =
| CDN of string
| Full
| Require of string
| NoReference
<summary>
Sets how plotly is referenced in the head of html docs.
</summary>
union case Plotly.NET.PlotlyJSReference.NoReference: Plotly.NET.PlotlyJSReference
val setA: string list
val setB: string list
val twoSets: GenericChart
type Chart =
static member Bubble: x: #IConvertible seq * y: #IConvertible seq * sizes: int seq * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: float seq * ?Text: 'c * ?MultiText: 'c seq * ?TextPosition: TextPosition * ?MultiTextPosition: TextPosition seq * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: MarkerSymbol * ?MultiMarkerSymbol: MarkerSymbol seq * ?Marker: Marker * ?LineColor: Color * ?LineColorScale: Colorscale * ?LineWidth: float * ?LineDash: DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: Orientation * ?GroupNorm: GroupNorm * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart (requires 'c :> IConvertible) + 2 overloads
static member Line: x: #IConvertible seq * y: #IConvertible seq * ?ShowMarkers: bool * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: float seq * ?Text: 'c * ?MultiText: 'c seq * ?TextPosition: TextPosition * ?MultiTextPosition: TextPosition seq * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: MarkerSymbol * ?MultiMarkerSymbol: MarkerSymbol seq * ?Marker: Marker * ?LineColor: Color * ?LineColorScale: Colorscale * ?LineWidth: float * ?LineDash: DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: Orientation * ?GroupNorm: GroupNorm * ?Fill: Fill * ?FillColor: Color * ?FillPattern: Pattern * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart (requires 'c :> IConvertible) + 2 overloads
static member Point: x: #IConvertible seq * y: #IConvertible seq * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: float seq * ?Text: 'c * ?MultiText: 'c seq * ?TextPosition: TextPosition * ?MultiTextPosition: TextPosition seq * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: MarkerSymbol * ?MultiMarkerSymbol: MarkerSymbol seq * ?Marker: Marker * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: Orientation * ?GroupNorm: GroupNorm * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart (requires 'c :> IConvertible) + 2 overloads
static member Range: x: #IConvertible seq * y: #IConvertible seq * upper: #IConvertible seq * lower: #IConvertible seq * mode: Mode * ?Name: string * ?GroupName: string * ?ShowMarkers: bool * ?ShowLegend: bool * ?Text: 'e * ?MultiText: 'e seq * ?TextPosition: TextPosition * ?MultiTextPosition: TextPosition seq * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: MarkerSymbol * ?MultiMarkerSymbol: MarkerSymbol seq * ?Marker: Marker * ?UpperMarker: Marker * ?LowerMarker: Marker * ?LineColor: Color * ?LineColorScale: Colorscale * ?LineWidth: float * ?LineDash: DrawingStyle * ?Line: Line * ?UpperLine: Line * ?LowerLine: Line * ?RangeColor: Color * ?RangePattern: Pattern * ?UpperText: 'f * ?MultiUpperText: 'f seq * ?LowerText: 'g * ?MultiLowerText: 'g seq * ?TextFont: Font * ?LowerName: string * ?UpperName: string * ?UseDefaults: bool -> GenericChart (requires 'e :> IConvertible and 'f :> IConvertible and 'g :> IConvertible) + 2 overloads
static member Scatter: ?X: 'a seq * ?XEncoded: EncodedTypedArray * ?MultiX: 'a seq seq * ?Y: 'b seq * ?YEncoded: EncodedTypedArray * ?MultiY: 'b seq seq * ?Mode: Mode * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: float seq * ?Text: 'c * ?MultiText: 'c seq * ?TextPosition: TextPosition * ?MultiTextPosition: TextPosition seq * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: MarkerSymbol * ?MultiMarkerSymbol: MarkerSymbol seq * ?Marker: Marker * ?LineColor: Color * ?LineColorScale: Colorscale * ?LineWidth: float * ?LineDash: DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: Orientation * ?GroupNorm: GroupNorm * ?Fill: Fill * ?FillColor: Color * ?FillPattern: Pattern * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart (requires 'a :> IConvertible and 'b :> IConvertible and 'c :> IConvertible) + 3 overloads
static member Spline: x: #IConvertible seq * y: #IConvertible seq * ?ShowMarkers: bool * ?Smoothing: float * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: float seq * ?Text: 'c * ?MultiText: 'c seq * ?TextPosition: TextPosition * ?MultiTextPosition: TextPosition seq * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: MarkerSymbol * ?MultiMarkerSymbol: MarkerSymbol seq * ?Marker: Marker * ?LineColor: Color * ?LineColorScale: Colorscale * ?LineWidth: float * ?LineDash: DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: Orientation * ?GroupNorm: GroupNorm * ?Fill: Fill * ?FillColor: Color * ?FillPattern: Pattern * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart (requires 'c :> IConvertible) + 2 overloads
static member Chart.Venn: set1: #seq<string> * set2: #seq<string> * ?Set3: #seq<string> * ?Label1: string * ?Label2: string * ?Label3: string * ?Colors: #seq<Color> * ?TextFont: Font * ?UseDefaults: bool -> GenericChart
static member Chart.withSize: width: float * height: float -> (GenericChart -> GenericChart)
static member Chart.withSize: ?Width: int * ?Height: int -> (GenericChart -> GenericChart)
type GenericChart =
| Chart of data: Trace * layout: Layout * config: Config * displayOpts: DisplayOptions
| MultiChart of data: Trace list * layout: Layout * config: Config * displayOpts: DisplayOptions
static member addConfig: config: Config -> gChart: GenericChart -> GenericChart
static member addDisplayOptions: displayOpts: DisplayOptions -> gChart: GenericChart -> GenericChart
static member addLayout: layout: Layout -> gChart: GenericChart -> GenericChart
static member combine: gCharts: GenericChart seq -> GenericChart
static member countTrace: gChart: GenericChart -> int
static member existsTrace: predicate: (Trace -> bool) -> gChart: GenericChart -> bool
static member fromChartDTO: dto: ChartDTO -> GenericChart
static member fromFigure: fig: Figure -> GenericChart
static member getConfig: gChart: GenericChart -> Config
static member getDisplayOptions: gChart: GenericChart -> DisplayOptions
...
<summary>
The central type that gets created by all Chart constructors is GenericChart, which itself represents either a single chart or a multi chart (as a Discriminate Union type).
A GenericChart consists of four top level objects: Trace (multiple of those in the case of a MultiChart), Layout, Config, and DisplayOptions.
- `Trace` is in principle the representation of a dataset on a chart, including for example the data itself, color and shape of the visualization, etc.
- `Layout` is everything of the chart that is not dataset specific - e.g. the shape and style of axes, the chart title, etc.
- `Config` is an object that configures high level properties of the chart like making all chart elements editable or the tool bar on top
- `DisplayOptions` is an object that contains meta information about how the html document that contains the chart.
</summary>
static member GenericChart.toChartHTML: gChart: GenericChart -> string
val threeSets: GenericChart
type Color =
override Equals: other: obj -> bool
override GetHashCode: unit -> int
static member fromARGB: a: int -> r: int -> g: int -> b: int -> Color
static member fromColorScaleValues: c: #IConvertible seq -> Color
static member fromColors: c: Color seq -> Color
static member fromHex: s: string -> Color
static member fromKeyword: c: ColorKeyword -> Color
static member fromRGB: r: int -> g: int -> b: int -> Color
static member fromString: c: string -> Color
member Value: obj
<summary>
Plotly color can be a single color, a sequence of colors, or a sequence of numeric values referencing the color of the colorscale obj
</summary>
static member Color.fromHex: s: string -> Color
Multiple items
type Font =
inherit DynamicObj
new: unit -> Font
static member init: ?Family: FontFamily * ?Size: float * ?Color: Color -> Font
static member style: ?Family: FontFamily * ?Size: float * ?Color: Color -> (Font -> Font)
<summary>
Font type inherits from dynamic object
</summary>
--------------------
new: unit -> Font
static member Font.init: ?Family: StyleParam.FontFamily * ?Size: float * ?Color: Color -> Font
module StyleParam
from Plotly.NET
type FontFamily =
| Arial
| Balto
| Courier_New
| Consolas
| Droid_Sans
| Droid_Serif
| Droid_Sans_Mono
| Gravitas_One
| Old_Standard_TT
| Open_Sans
...
member Convert: unit -> objnull
override ToString: unit -> string
static member convert: (FontFamily -> objnull)
static member toString: (FontFamily -> string)
<summary>
Names of installed font families
</summary>
union case StyleParam.FontFamily.Arial: StyleParam.FontFamily