-
Notifications
You must be signed in to change notification settings - Fork 99
/
Copy path8_0_polar-charts.fsx
64 lines (49 loc) · 1.65 KB
/
8_0_polar-charts.fsx
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
(**
---
title: Polar charts
category: Polar Charts
categoryindex: 8
index: 1
---
*)
(*** hide ***)
(*** condition: prepare ***)
#r "nuget: Newtonsoft.JSON, 12.0.3"
#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
(**
# Polar charts
[](https://mybinder.org/v2/gh/plotly/Plotly.NET/gh-pages?filepath={{fsdocs-source-basename}}.ipynb) 
[]({{root}}{{fsdocs-source-basename}}.fsx) 
[]({{root}}{{fsdocs-source-basename}}.ipynb)
*Summary:* This example shows how to create polar charts in F#.
let's first create some data for the purpose of creating example charts:
*)
open Plotly.NET
let r = [ 1; 2; 3; 4; 5; 6; 7;]
let r2 = [ 5; 6; 7; 1; 2; 3; 4;]
let r3 = [ 3; 1; 5; 2; 8; 7; 5;]
let t = [0; 45; 90; 135; 200; 320; 184;]
(**
A polar chart is a graphical method of displaying multivariate data in the form of a two-dimensional chart
of three or more quantitative variables represented on axes starting from the same point.
The relative position and angle of the axes is typically uninformative.
*)
let polar1 =
[
Chart.Polar(r,t,StyleParam.Mode.Markers,Name="1")
Chart.Polar(r2,t,StyleParam.Mode.Markers,Name="2")
Chart.Polar(r3,t,StyleParam.Mode.Markers,Name="3")
]
|> Chart.Combine
(*** condition: ipynb ***)
#if IPYNB
polar1
#endif // IPYNB
(***hide***)
polar1 |> GenericChart.toChartHTML
(***include-it-raw***)