Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/build-and-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: build and deploy docs

on:
push:
branches: [ dev ]
on: workflow_dispatch

jobs:
build-and-deploy-docs:
Expand All @@ -14,7 +12,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
dotnet-version: '5.0.201'
- name: Restore tools
run: dotnet tool restore
- name: Build docs
Expand Down
106 changes: 54 additions & 52 deletions Plotly.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,68 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".ci", ".ci", "{2461AFBF-6E10-4F7B-A0EA-3D62541C2EB1}"
ProjectSection(SolutionItems) = preProject
.github\workflows\build-and-deploy-docs.yml = .github\workflows\build-and-deploy-docs.yml
.circleci\config.yml = .circleci\config.yml
.github\workflows\build-and-test.yml = .github\workflows\build-and-test.yml
.github\workflows\verify-docs.yml = .github\workflows\verify-docs.yml
EndProjectSection
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Plotly.NET.Interactive", "src\Plotly.NET.Interactive\Plotly.NET.Interactive.fsproj", "{0F135E3B-B0E1-42A9-B180-18C0221DC7B8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{7B09CC0A-F1E1-4094-9DE4-B047581E01F0}"
ProjectSection(SolutionItems) = preProject
docs\00_0_basics.fsx = docs\00_0_basics.fsx
docs\00_1_image-export.fsx = docs\00_1_image-export.fsx
docs\00_2_display-options.fsx = docs\00_2_display-options.fsx
docs\00_3_chart-config.fsx = docs\00_3_chart-config.fsx
docs\01_0_axis-styling.fsx = docs\01_0_axis-styling.fsx
docs\01_1_errorbars.fsx = docs\01_1_errorbars.fsx
docs\01_2_multiple-charts.fsx = docs\01_2_multiple-charts.fsx
docs\01_3_shapes.fsx = docs\01_3_shapes.fsx
docs\01_4_annotations.fsx = docs\01_4_annotations.fsx
docs\02_0_line-scatter-plots.fsx = docs\02_0_line-scatter-plots.fsx
docs\02_1_bar-and-column-charts.fsx = docs\02_1_bar-and-column-charts.fsx
docs\02_2_area-plots.fsx = docs\02_2_area-plots.fsx
docs\02_3_range-plots.fsx = docs\02_3_range-plots.fsx
docs\02_4_bubble-charts.fsx = docs\02_4_bubble-charts.fsx
docs\02_5_pie-doughnut-charts.fsx = docs\02_5_pie-doughnut-charts.fsx
docs\02_6_table.fsx = docs\02_6_table.fsx
docs\02_7_heatmaps.fsx = docs\02_7_heatmaps.fsx
docs\03_0_3d-scatter-plots.fsx = docs\03_0_3d-scatter-plots.fsx
docs\03_1_3d-surface-plots.fsx = docs\03_1_3d-surface-plots.fsx
docs\03_2_3d-mesh-plots.fsx = docs\03_2_3d-mesh-plots.fsx
docs\03_3_3d-cone-charts.fsx = docs\03_3_3d-cone-charts.fsx
docs\03_4_3d-streamtube-plots.fsx = docs\03_4_3d-streamtube-plots.fsx
docs\03_5_3d-volume-plots.fsx = docs\03_5_3d-volume-plots.fsx
docs\03_6_3d-isosurface-plots .fsx = docs\03_6_3d-isosurface-plots .fsx
docs\04_0_histograms.fsx = docs\04_0_histograms.fsx
docs\04_1_box-plots.fsx = docs\04_1_box-plots.fsx
docs\04_2_violin-plots.fsx = docs\04_2_violin-plots.fsx
docs\04_3_contour-plots.fsx = docs\04_3_contour-plots.fsx
docs\04_4_2d-histograms.fsx = docs\04_4_2d-histograms.fsx
docs\04_5_splom.fsx = docs\04_5_splom.fsx
docs\05_0_geo-vs-mapbox.fsx = docs\05_0_geo-vs-mapbox.fsx
docs\05_1_geo-plots.fsx = docs\05_1_geo-plots.fsx
docs\05_2_choropleth-map.fsx = docs\05_2_choropleth-map.fsx
docs\06_0_geo-vs-mapbox.fsx = docs\06_0_geo-vs-mapbox.fsx
docs\06_1_mapbox-plots.fsx = docs\06_1_mapbox-plots.fsx
docs\06_2_choropleth-mapbox.fsx = docs\06_2_choropleth-mapbox.fsx
docs\06_3_density-mapbox.fsx = docs\06_3_density-mapbox.fsx
docs\07_0_candlestick.fsx = docs\07_0_candlestick.fsx
docs\07_1_funnel.fsx = docs\07_1_funnel.fsx
docs\07_2_funnel_area.fsx = docs\07_2_funnel_area.fsx
docs\08_0_polar_line-scatter-plots.fsx = docs\08_0_polar_line-scatter-plots.fsx
docs\08_1_polar_bar_charts.fsx = docs\08_1_polar_bar_charts.fsx
docs\08_2_styling_polar_layouts.fsx = docs\08_2_styling_polar_layouts.fsx
docs\09_0_parallel-categories.fsx = docs\09_0_parallel-categories.fsx
docs\09_1_parallel-coords.fsx = docs\09_1_parallel-coords.fsx
docs\09_2_sankey.fsx = docs\09_2_sankey.fsx
docs\10_0_ternary_line_scatter_plots.fsx = docs\10_0_ternary_line_scatter_plots.fsx
docs\10_1_styling_ternary_layouts.fsx = docs\10_1_styling_ternary_layouts.fsx
docs\_template.fsx = docs\_template.fsx
docs\_template.html = docs\_template.html
docs\_template.ipynb = docs\_template.ipynb
docs\Dockerfile = docs\Dockerfile
docs\index.fsx = docs\index.fsx
docs\NuGet.config = docs\NuGet.config
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "reference", "reference", "{5219BAC7-ACE6-435F-A983-BC63DD7B745E}"
Expand All @@ -50,58 +103,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "reference", "reference", "{
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{60FB82C0-F472-494E-BCF7-7B3C54212406}"
ProjectSection(SolutionItems) = preProject
docs\0_0_basics.fsx = docs\0_0_basics.fsx
docs\0_1_image-export.fsx = docs\0_1_image-export.fsx
docs\0_2_display-options.fsx = docs\0_2_display-options.fsx
docs\0_3_chart-config.fsx = docs\0_3_chart-config.fsx
docs\1_0_axis-styling.fsx = docs\1_0_axis-styling.fsx
docs\1_1_errorbars.fsx = docs\1_1_errorbars.fsx
docs\1_2_multiple-charts.fsx = docs\1_2_multiple-charts.fsx
docs\1_3_shapes.fsx = docs\1_3_shapes.fsx
docs\1_4_annotations.fsx = docs\1_4_annotations.fsx
docs\2_0_line-scatter-plots.fsx = docs\2_0_line-scatter-plots.fsx
docs\2_1_bar-and-column-charts.fsx = docs\2_1_bar-and-column-charts.fsx
docs\2_2_area-plots.fsx = docs\2_2_area-plots.fsx
docs\2_3_range-plots.fsx = docs\2_3_range-plots.fsx
docs\2_4_bubble-charts.fsx = docs\2_4_bubble-charts.fsx
docs\2_5_pie-doughnut-charts.fsx = docs\2_5_pie-doughnut-charts.fsx
docs\2_6_table.fsx = docs\2_6_table.fsx
docs\2_7_heatmaps.fsx = docs\2_7_heatmaps.fsx
docs\3_0_3d-scatter-plots.fsx = docs\3_0_3d-scatter-plots.fsx
docs\3_1_3d-surface-plots.fsx = docs\3_1_3d-surface-plots.fsx
docs\3_2_3d-mesh-plots.fsx = docs\3_2_3d-mesh-plots.fsx
docs\3_3_3d-cone-charts.fsx = docs\3_3_3d-cone-charts.fsx
docs\3_4_3d-streamtube-plots.fsx = docs\3_4_3d-streamtube-plots.fsx
docs\3_5_3d-volume-plots.fsx = docs\3_5_3d-volume-plots.fsx
docs\3_6_3d-isosurface-plots .fsx = docs\3_6_3d-isosurface-plots .fsx
docs\4_0_histograms.fsx = docs\4_0_histograms.fsx
docs\4_1_box-plots.fsx = docs\4_1_box-plots.fsx
docs\4_2_violin-plots.fsx = docs\4_2_violin-plots.fsx
docs\4_3_contour-plots.fsx = docs\4_3_contour-plots.fsx
docs\4_4_2d-histograms.fsx = docs\4_4_2d-histograms.fsx
docs\4_5_splom.fsx = docs\4_5_splom.fsx
docs\5_0_geo-vs-mapbox.fsx = docs\5_0_geo-vs-mapbox.fsx
docs\5_1_geo-plots.fsx = docs\5_1_geo-plots.fsx
docs\5_2_choropleth-map.fsx = docs\5_2_choropleth-map.fsx
docs\6_0_geo-vs-mapbox.fsx = docs\6_0_geo-vs-mapbox.fsx
docs\6_1_mapbox-plots.fsx = docs\6_1_mapbox-plots.fsx
docs\6_2_choropleth-mapbox.fsx = docs\6_2_choropleth-mapbox.fsx
docs\6_3_density-mapbox.fsx = docs\6_3_density-mapbox.fsx
docs\7_0_candlestick.fsx = docs\7_0_candlestick.fsx
docs\7_1_funnel.fsx = docs\7_1_funnel.fsx
docs\7_2_funnel_area.fsx = docs\7_2_funnel_area.fsx
docs\8_0_polar_line-scatter-plots.fsx = docs\8_0_polar_line-scatter-plots.fsx
docs\8_1_polar_bar_charts.fsx = docs\8_1_polar_bar_charts.fsx
docs\8_2_styling_polar_layouts.fsx = docs\8_2_styling_polar_layouts.fsx
docs\9_0_parallel-categories.fsx = docs\9_0_parallel-categories.fsx
docs\9_1_parallel-coords.fsx = docs\9_1_parallel-coords.fsx
docs\9_2_sankey.fsx = docs\9_2_sankey.fsx
docs\_template.html = docs\_template.html
docs\_template.ipynb = docs\_template.ipynb
docs\Dockerfile = docs\Dockerfile
docs\content\fsdocs-custom.css = docs\content\fsdocs-custom.css
docs\index.fsx = docs\index.fsx
docs\NuGet.config = docs\NuGet.config
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "img", "img", "{CDB973F2-0F60-4ADB-84A8-924AFA8B6D49}"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/5_0_geo-vs-mapbox.fsx → docs/05_0_geo-vs-mapbox.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Plotly and therefore Plotly.NET supports two different kinds of maps:
- **Geo maps** are outline-based maps. If your figure is created with a `Chart.ScatterGeo, `Chart.PointGeo`, `Chart.LineGeo` or `Chart.Choropleth` function or
otherwise contains one or more traces of type `scattergeo` or `choropleth`, the layout.geo object in your figure contains configuration information for the map itself.

_This page documents Geo outline-based maps, and the [Mapbox Layers documentation]({{root}}/6_0_geo-vs-mapbox.html) describes how to configure Mapbox tile-based maps._
_This page documents Geo outline-based maps, and the [Mapbox Layers documentation]({{root}}/06_0_geo-vs-mapbox.html) describes how to configure Mapbox tile-based maps._

## Physical Base Maps

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/6_0_geo-vs-mapbox.fsx → docs/06_0_geo-vs-mapbox.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Plotly and therefore Plotly.NET supports two different kinds of maps:
- **Geo maps** are outline-based maps. If your figure is created with a `Chart.ScatterGeo, `Chart.PointGeo`, `Chart.LineGeo` or `Chart.Choropleth` function or
otherwise contains one or more traces of type `scattergeo` or `choropleth`, the layout.geo object in your figure contains configuration information for the map itself.

_This page documents Mapbox tile-based maps, and the [Geo map documentation]({{root}}/5_0_geo-vs-mapbox.html) describes how to configure outline-based maps_
_This page documents Mapbox tile-based maps, and the [Geo map documentation]({{root}}/05_0_geo-vs-mapbox.html) describes how to configure outline-based maps_

## How Layers Work in Mapbox Tile Maps

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
94 changes: 94 additions & 0 deletions docs/10_0_ternary_line_scatter_plots.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
(**
---
title: Ternary line and scatter plots
category: Ternary Plots
categoryindex: 10
index: 1
---
*)

(*** hide ***)

(*** condition: prepare ***)
#r "nuget: Newtonsoft.JSON, 12.0.3"
#r "nuget: DynamicObj"
#r "../bin/Plotly.NET/netstandard2.0/Plotly.NET.dll"

(*** condition: ipynb ***)
#if IPYNB
#r "nuget: Plotly.NET, {{fsdocs-package-version}}"
#r "nuget: Plotly.NET.Interactive, {{fsdocs-package-version}}"
#endif // IPYNB

(**
# Ternary charts

[![Binder]({{root}}img/badge-binder.svg)](https://mybinder.org/v2/gh/plotly/Plotly.NET/gh-pages?filepath={{fsdocs-source-basename}}.ipynb) 
[![Script]({{root}}img/badge-script.svg)]({{root}}{{fsdocs-source-basename}}.fsx) 
[![Notebook]({{root}}img/badge-notebook.svg)]({{root}}{{fsdocs-source-basename}}.ipynb)

*Summary:* This example shows how to create ternary charts in F#.

let's first create some data for the purpose of creating example charts:

*)

open Plotly.NET

// a coordinates
let a = [ 1; 2; 3; 4; 5; 6; 7;]

// b coordinates
let b = a |> List.rev

//c
let c = [ 2; 2; 2; 2; 2; 2; 2;]


(**
A Ternary plot is a barycentric plot on three variables which sum to a constant.

It graphically depicts the ratios of the three variables as positions in an equilateral triangle.

It is used in physical chemistry, petrology, mineralogy, metallurgy, and other physical sciences to show the compositions of systems composed of three species.
In population genetics, a triangle plot of genotype frequencies is called a de Finetti diagram. In game theory, it is often called a simplex plot.

Ternary plots are tools for analyzing compositional data in the three-dimensional case.

## Ternary point charts

use `Chart.PointTernary` to create a ternary plot that displays points on a ternary coordinate system:
*)

let ternaryPolar = Chart.PointTernary(a,b,c)
(*** condition: ipynb ***)
#if IPYNB
ternaryPolar
#endif // IPYNB

(***hide***)
ternaryPolar |> GenericChart.toChartHTML
(***include-it-raw***)

(**
## Ternary line charts

use `Chart.LineTernary` to create a ternary plot that displays a line connecting input the data on a ternary coordinate system:

As values on ternary plots sum to a constant, you can omit one dimension ofd the data by providing that sum.

You can also for example change the line style using `Chart.withLineStyle`
*)

let lineTernary =
Chart.LineTernary(a,b,Sum = 10)
|> Chart.withLineStyle(Color=Color.fromString "purple",Dash=StyleParam.DrawingStyle.DashDot)

(*** condition: ipynb ***)
#if IPYNB
lineTernary
#endif // IPYNB

(***hide***)
lineTernary |> GenericChart.toChartHTML
(***include-it-raw***)
110 changes: 110 additions & 0 deletions docs/10_1_styling_ternary_layouts.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
(**
---
title: Styling ternary layouts
category: Ternary Plots
categoryindex: 9
index: 3
---
*)

(*** hide ***)

(*** condition: prepare ***)
#r "nuget: Newtonsoft.JSON, 12.0.3"
#r "nuget: DynamicObj"
#r "../bin/Plotly.NET/netstandard2.0/Plotly.NET.dll"

(*** condition: ipynb ***)
#if IPYNB
#r "nuget: Plotly.NET, {{fsdocs-package-version}}"
#r "nuget: Plotly.NET.Interactive, {{fsdocs-package-version}}"
#endif // IPYNB

(**
# Styling ternary layouts

[![Binder]({{root}}img/badge-binder.svg)](https://mybinder.org/v2/gh/plotly/Plotly.NET/gh-pages?filepath={{fsdocs-source-basename}}.ipynb) 
[![Script]({{root}}img/badge-script.svg)]({{root}}{{fsdocs-source-basename}}.fsx) 
[![Notebook]({{root}}img/badge-notebook.svg)]({{root}}{{fsdocs-source-basename}}.ipynb)

*Summary:* This example shows how to style polar layouts in F#.

let's first create some data for the purpose of creating example charts:
*)
open Plotly.NET

// a coordinates
let a = [ 1; 2; 3; 4; 5; 6; 7;]

// b coordinates
let b = a |> List.rev

//c
let c = [ 2; 2; 2; 2; 2; 2; 2;]

(**
Consider this combined ternary chart:
*)

let combinedTernary =
[
Chart.PointTernary(a,b,c)
Chart.LineTernary(a,c,Sum = 10)
]

|> Chart.combine

(*** condition: ipynb ***)
#if IPYNB
combinedTernary
#endif // IPYNB

(***hide***)
combinedTernary |> GenericChart.toChartHTML
(***include-it-raw***)

(**
## Styling the polar layout

Use the `Chart.withTernary` function and initialize a Ternary layout with the desired looks
*)
open Plotly.NET.LayoutObjects

let styledTernary =
combinedTernary
|> Chart.withTernary(
Ternary.init(
AAxis = LinearAxis.init(Title = Title.init("A"), Color = Color.fromKeyword ColorKeyword.DarkOrchid),
BAxis = LinearAxis.init(Title = Title.init("B"), Color = Color.fromKeyword ColorKeyword.DarkRed)
)
)

(*** condition: ipynb ***)
#if IPYNB
styledTernary
#endif // IPYNB

(***hide***)
styledTernary |> GenericChart.toChartHTML
(***include-it-raw***)

(**
## Styling A, B, and C Axes

You could pass these axes to `Chart.withTernary` as above, but for the case where you want to specifically set one axis, there are the `Chart.withAAxis`, `Chart.withBAxis`, `Chart.withCAxis` functions:
*)

let styledTernary2 =
styledTernary
|> Chart.withCAxis(LinearAxis.init(Title = Title.init("C"), Color = Color.fromKeyword ColorKeyword.DarkCyan))



(*** condition: ipynb ***)
#if IPYNB
styledTernary2
#endif // IPYNB

(***hide***)
styledTernary2 |> GenericChart.toChartHTML
(***include-it-raw***)
2 changes: 1 addition & 1 deletion docs/index.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ One of the main design points of Plotly.NET it is to provide support for multipl

[(1,5);(2,10)]
|> Chart.Point
|> Chart.withTraceName("Hello from F#",Showlegend=true)
|> Chart.withTraceName("Hello from F#",ShowLegend=true)
|> Chart.withYAxisStyle("xAxis",ShowGrid= false, ShowLine=true)
|> Chart.withXAxisStyle("yAxis",ShowGrid= false, ShowLine=true)

Expand Down
Loading