Skip to content

Commit 91ec800

Browse files
committed
Fixed merge conflict
2 parents 370b440 + b2e9377 commit 91ec800

13 files changed

+132
-83
lines changed

.paket/paket.bootstrapper.exe

0 Bytes
Binary file not shown.

docs/content/3d-surface-plots.fsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
#r "../../bin/FSharp.Plotly.dll"
44

55
(**
6-
# FSharp.Plotly: Pie and Doughnut Charts
6+
# FSharp.Plotly: 3D surface plot Charts
77
8-
*Summary:* This example shows how to create pie and doughnut charts in F#.
9-
10-
A pie or a doughnut chart can be created using the `Chart.Pie` and `Chart.Doughnut` functions.
11-
When creating pie or doughnut charts, it is usually desirable to provide both labels and
12-
values.
8+
*Summary:* This example shows how to create 3D surface plots in F#.
139
*)
1410

1511
open System
@@ -42,11 +38,15 @@ let b = Array.init 50 (fun _ -> rnd.NextDouble())
4238
let c = Array.init 50 (fun _ -> rnd.NextDouble())
4339

4440

45-
(*** define-output:contour1 ***)
41+
(*** define-output:surface1 ***)
4642
z
4743
|> Chart.Surface
48-
|> Chart.withSize(600.,600.)
49-
(*** include-it:contour1 ***)
44+
(*** include-it:surface1 ***)
45+
46+
47+
48+
49+
5050

5151
// Create simple example data were x y and z is given (z is a xy-Matrix)
5252
let x' = [0.;2.5]
@@ -56,8 +56,8 @@ let z' = [
5656
[1.;2.;];
5757
] // column (length y)
5858

59-
(*** define-output:contour2 ***)
59+
(*** define-output:surface2 ***)
6060
Chart.Surface(z',x',y',Opacity=0.5,Contours=Contours.initXyz(Show=true))
61-
(*** define-output:contour2 ***)
61+
(*** define-output:surface2 ***)
6262

6363

docs/content/choropleth-map.fsx

Lines changed: 58 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,71 @@
33
#r "../../bin/FSharp.Plotly.dll"
44

55
(**
6-
# FSharp.Plotly: BoxPlot Charts
6+
# FSharp.Plotly: Choropleth Maps
77
8-
*Summary:* This example shows how to create boxplot charts in F#.
8+
*Summary:* This example shows how to create choropleth map in F#.
99
10-
A box plot or boxplot is a convenient way of graphically depicting groups of numerical data through their quartiles.
11-
Box plots may also have lines extending vertically from the boxes (whiskers) indicating variability outside the upper
12-
and lower quartiles, hence the terms box-and-whisker plot and box-and-whisker diagram.
13-
Outliers may be plotted as individual points.
10+
Choropleth Maps display divided geographical areas or regions that are coloured, shaded or patterned in relation to
11+
a data variable. This provides a way to visualise values over a geographical area, which can show variation or
12+
patterns across the displayed location.
1413
*)
1514

1615
open FSharp.Plotly
1716

1817
let locations,z =
19-
[("Belarus",17.5); ("Moldova",16.8);("Lithuania",15.4);("Russia",15.1);("Romania",14.4);("Ukraine",13.9);
20-
("Andorra",13.8);("Hungary",13.3);("Czech Republic",13.);("Slovakia",13.);("Portugal",12.9);("Serbia",12.6);
21-
("Grenada",12.5);("Poland",12.5);("Latvia",12.3);("Finland",12.3);("South Korea",12.3);("France",12.2);
22-
("Australia",12.2);("Croatia",12.2);("Ireland",11.9);("Luxembourg",11.9);("Germany",11.8);("Slovenia",11.6);
23-
("United Kingdom",11.6);("Denmark",11.4);("Bulgaria",11.4);("Spain",11.2);("Belgium",11.);("South Africa",11.);
24-
("New Zealand",10.9);("Gabon",10.9);("Namibia",10.8);("Switzerland",10.7);("Saint Lucia",10.4);
25-
("Austria",10.3);("Estonia",10.3);("Greece",10.3);("Kazakhstan",10.3);("Canada",10.2);("Nigeria",10.1);
26-
("Netherlands",9.9);("Uganda",9.8);("Rwanda",9.8);("Chile",9.6);("Argentina",9.3);("Burundi",9.3);
27-
("United States",9.2);("Cyprus",9.2);("Sweden",9.2);("Venezuela",8.9);("Paraguay",8.8);("Brazil",8.7);
28-
("Sierra Leone",8.7);("Montenegro",8.7);("Belize",8.5);("Cameroon",8.4);("Botswana",8.4);("Saint Kitts and Nevis",8.2);
29-
("Guyana",8.1);("Peru",8.1);("Panama",8.);("Niue",8.);("Palau",7.9);("Norway",7.7);("Tanzania",7.7);("Georgia",7.7);
30-
("Uruguay",7.6);("Angola",7.5);("Laos",7.3);("Japan",7.2);("Mexico",7.2);("Ecuador",7.2);("Dominica",7.1);
31-
("Iceland",7.1);("Thailand",7.1);("Bosnia and Herzegovina",7.1);("Sao Tome and Principe",7.1);("Malta",7.);
32-
("Albania",7.);("Bahamas",6.9);("Dominican Republic",6.9);("Mongolia",6.9);("Cape Verde",6.9);("Barbados",6.8);
33-
("Burkina Faso",6.8);("Italy",6.7);("Trinidad and Tobago",6.7);("China",6.7);("Macedonia",6.7);
34-
("Saint Vincent and the Grenadines",6.6);("Equatorial Guinea",6.6);("Suriname",6.6);("Vietnam",6.6);
35-
("Lesotho",6.5);("Haiti",6.4);("Cook Islands",6.4);("Colombia",6.2);("Ivory Coast",6.);("Bolivia",5.9);
36-
("Swaziland",5.7);("Zimbabwe",5.7);("Seychelles",5.6);("Cambodia",5.5);("Puerto Rico",5.4);("Netherlands Antilles",5.4);
37-
("Philippines",5.4);("Costa Rica",5.4);("Armenia",5.3);("Cuba",5.2);("Nicaragua",5.);("Jamaica",4.9);("Ghana",4.8);
38-
("Liberia",4.7);("Uzbekistan",4.6);("Chad",4.4);("United Arab Emirates",4.3);("Kyrgyzstan",4.3);
39-
("India",4.3);("Turkmenistan",4.3);("Kenya",4.3);("Ethiopia",4.2);("Honduras",4.);("Guinea-Bissau",4.);("Zambia",4.);
40-
("Republic of the Congo",3.9);("Guatemala",3.8);("Central African Republic",3.8);("North Korea",3.7);("Sri Lanka",3.7);
41-
("Mauritius",3.6);("Samoa",3.6);("Democratic Republic of the Congo",3.6);("Nauru",3.5);("Gambia",3.4);
42-
("Federated States of Micronesia",3.3);("El Salvador",3.2);("Fiji",3.);("Papua New Guinea",3.);("Kiribati",3.);
43-
("Tajikistan",2.8);("Israel",2.8);("Sudan",2.7);("Malawi",2.5);("Lebanon",2.4);("Azerbaijan",2.3);("Mozambique",2.3);
44-
("Togo",2.3);("Nepal",2.2);("Brunei",2.1);("Benin",2.1);("Singapore",2.);("Turkey",2.);("Madagascar",1.8);("Solomon Islands",1.7);
45-
("Tonga",1.6);("Tunisia",1.5);("Tuvalu",1.5);("Qatar",1.5);("Vanuatu",1.4);("Djibouti",1.3);("Malaysia",1.3);
46-
("Syria",1.2);("Maldives",1.2);("Mali",1.1);("Eritrea",1.1);("Algeria",1.);("Iran",1.);("Oman",0.9);("Brunei",0.9);
47-
("Morocco",0.9);("Jordan",0.7);("Bhutan",0.7);("Guinea",0.7);("Burma",0.7);("Afghanistan",0.7);("Senegal",0.6);
48-
("Indonesia",0.6);("Timor-Leste",0.6);("Iraq",0.5);("Somalia",0.5);("Egypt",0.4);("Niger",0.3);("Yemen",0.3);
49-
("Comoros",0.2);("Saudi Arabia",0.2);("Bangladesh",0.2);("Kuwait",0.1);("Libya",0.1);("Mauritania",0.1);("Pakistan",0.1);]
18+
[("Belarus",17.5); ("Moldova",16.8);("Lithuania",15.4);("Russia",15.1);
19+
("Romania",14.4);("Ukraine",13.9);("Andorra",13.8);("Hungary",13.3);
20+
("Czech Republic",13.);("Slovakia",13.);("Portugal",12.9);("Serbia",12.6);
21+
("Grenada",12.5);("Poland",12.5);("Latvia",12.3);("Finland",12.3);
22+
("South Korea",12.3);("France",12.2);("Australia",12.2);("Croatia",12.2);
23+
("Ireland",11.9);("Luxembourg",11.9);("Germany",11.8);("Slovenia",11.6);
24+
("United Kingdom",11.6);("Denmark",11.4);("Bulgaria",11.4);("Spain",11.2);
25+
("Belgium",11.);("South Africa",11.);("New Zealand",10.9);("Gabon",10.9);
26+
("Namibia",10.8);("Switzerland",10.7);("Saint Lucia",10.4);("Austria",10.3);
27+
("Estonia",10.3);("Greece",10.3);("Kazakhstan",10.3);("Canada",10.2);
28+
("Nigeria",10.1);("Netherlands",9.9);("Uganda",9.8);("Rwanda",9.8);
29+
("Chile",9.6);("Argentina",9.3);("Burundi",9.3);("United States",9.2);
30+
("Cyprus",9.2);("Sweden",9.2);("Venezuela",8.9);("Paraguay",8.8);("Brazil",8.7);
31+
("Sierra Leone",8.7);("Montenegro",8.7);("Belize",8.5);("Cameroon",8.4);
32+
("Botswana",8.4);("Saint Kitts and Nevis",8.2);("Guyana",8.1);("Peru",8.1);
33+
("Panama",8.);("Niue",8.);("Palau",7.9);("Norway",7.7);("Tanzania",7.7);
34+
("Georgia",7.7);("Uruguay",7.6);("Angola",7.5);("Laos",7.3);("Japan",7.2);
35+
("Mexico",7.2);("Ecuador",7.2);("Dominica",7.1);("Iceland",7.1);
36+
("Thailand",7.1);("Bosnia and Herzegovina",7.1);("Sao Tome and Principe",7.1);
37+
("Malta",7.);("Albania",7.);("Bahamas",6.9);("Dominican Republic",6.9);
38+
("Mongolia",6.9);("Cape Verde",6.9);("Barbados",6.8);("Burkina Faso",6.8);
39+
("Italy",6.7);("Trinidad and Tobago",6.7);("China",6.7);("Macedonia",6.7);
40+
("Saint Vincent and the Grenadines",6.6);("Equatorial Guinea",6.6);
41+
("Suriname",6.6);("Vietnam",6.6);("Lesotho",6.5);("Haiti",6.4);
42+
("Cook Islands",6.4);("Colombia",6.2);("Ivory Coast",6.);("Bolivia",5.9);
43+
("Swaziland",5.7);("Zimbabwe",5.7);("Seychelles",5.6);("Cambodia",5.5);
44+
("Puerto Rico",5.4);("Netherlands Antilles",5.4);("Philippines",5.4);
45+
("Costa Rica",5.4);("Armenia",5.3);("Cuba",5.2);("Nicaragua",5.);
46+
("Jamaica",4.9);("Ghana",4.8);("Liberia",4.7);("Uzbekistan",4.6);
47+
("Chad",4.4);("United Arab Emirates",4.3);("Kyrgyzstan",4.3);("India",4.3);
48+
("Turkmenistan",4.3);("Kenya",4.3);("Ethiopia",4.2);("Honduras",4.);
49+
("Guinea-Bissau",4.);("Zambia",4.);("Republic of the Congo",3.9);("Guatemala",3.8);
50+
("Central African Republic",3.8);("North Korea",3.7);("Sri Lanka",3.7);
51+
("Mauritius",3.6);("Samoa",3.6);("Democratic Republic of the Congo",3.6);
52+
("Nauru",3.5);("Gambia",3.4);("Federated States of Micronesia",3.3);
53+
("El Salvador",3.2);("Fiji",3.);("Papua New Guinea",3.);("Kiribati",3.);
54+
("Tajikistan",2.8);("Israel",2.8);("Sudan",2.7);("Malawi",2.5);("Lebanon",2.4);
55+
("Azerbaijan",2.3);("Mozambique",2.3);("Togo",2.3);("Nepal",2.2);("Brunei",2.1);
56+
("Benin",2.1);("Singapore",2.);("Turkey",2.);("Madagascar",1.8);("Solomon Islands",1.7);
57+
("Tonga",1.6);("Tunisia",1.5);("Tuvalu",1.5);("Qatar",1.5);("Vanuatu",1.4);
58+
("Djibouti",1.3);("Malaysia",1.3);("Syria",1.2);("Maldives",1.2);("Mali",1.1);
59+
("Eritrea",1.1);("Algeria",1.);("Iran",1.);("Oman",0.9);("Brunei",0.9);
60+
("Morocco",0.9);("Jordan",0.7);("Bhutan",0.7);("Guinea",0.7);("Burma",0.7);
61+
("Afghanistan",0.7);("Senegal",0.6);("Indonesia",0.6);("Timor-Leste",0.6);
62+
("Iraq",0.5);("Somalia",0.5);("Egypt",0.4);("Niger",0.3);("Yemen",0.3);
63+
("Comoros",0.2);("Saudi Arabia",0.2);("Bangladesh",0.2);("Kuwait",0.1);
64+
("Libya",0.1);("Mauritania",0.1);("Pakistan",0.1);]
5065
|> List.unzip
5166

67+
68+
// Pure alcohol consumption among adults (age 15+) in 2010
69+
70+
(*** define-output:ChoroplethMap1 ***)
5271
Chart.ChoroplethMap(locations,z,Locationmode=StyleParam.LocationFormat.CountryNames)
53-
|> Chart.Show
72+
(*** include-it:ChoroplethMap1 ***)
73+

docs/content/errorbars.fsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Chart.Point(x,y',Name="points with errors")
2626
|> Chart.withXErrorStyle (Array=[|0.2;0.3;0.2;0.1;0.2;0.4;0.2;0.08;0.2;0.1;|])
2727
|> Chart.withYErrorStyle (Array=[|0.3;0.2;0.1;0.4;0.2;0.4;0.1;0.18;0.02;0.2;|])
2828
(*** include-it:pointsWithErrorBars ***)
29-
//|> Chart.Show
3029

3130

3231

docs/content/getting-started.fsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,18 @@ The library provides a complete mapping for the configuration options of the und
1616
#r "../../bin/FSharp.Plotly.dll"
1717
open FSharp.Plotly
1818

19-
// Functional F# scripting style
19+
(**
20+
## Using functional F# scripting style
21+
*)
2022

2123

2224
Chart.Scatter ([1; 2; 3; 4],[12; 9; 15; 12],
2325
StyleParam.Mode.Lines_Markers,
2426
Name="lines and markers")
2527

26-
27-
// Dynanic object
28+
(**
29+
## Using dynamic object style
30+
*)
2831

2932
let scattern =
3033
let dyn = Trace("scatter")
@@ -39,6 +42,9 @@ scattern
3942

4043

4144

45+
(**
46+
## Using guided dynamic style
47+
*)
4248

4349
Trace.initScatter (
4450
Trace.TraceStyle.Scatter
@@ -50,7 +56,9 @@ Trace.initScatter (
5056
|> GenericChart.ofTraceObject
5157

5258

53-
59+
(**
60+
## Using mixed dynamic object style
61+
*)
5462
Trace.initScatter
5563
(fun scatter ->
5664
scatter?x <- [1; 2; 3; 4]

docs/content/histograms.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#r "../../bin/FSharp.Plotly.dll"
44

55
(**
6-
# FSharp.Plotly: Histogram2d
6+
# FSharp.Plotly: Histogram
77
88
*Summary:* This example shows how to create a one-dimensional histogram of a data samples in F#.
99

docs/content/line-scatter-plots.fsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,5 @@ Chart.Point(x,y',Name="points with errors")
7272
|> Chart.withXErrorStyle (Array=[|0.2;0.3;0.2;0.1;0.2;0.4;0.2;0.08;0.2;0.1;|])
7373
|> Chart.withYErrorStyle (Array=[|0.3;0.2;0.1;0.4;0.2;0.4;0.1;0.18;0.02;0.2;|])
7474
(*** include-it:pointsWithErrorBars ***)
75-
//|> Chart.Show
75+
76+

docs/content/multiple-charts.fsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ Functional F# scripting style for Two Y-Axes same side
4949
|> Chart.Combine
5050
|> Chart.withX_AxisStyle("x-axis",Domain=(0.3, 1.0))
5151
|> Chart.withY_AxisStyle("first y-axis")
52-
|> Chart.withY_AxisStyle("second y-axis",Side=StyleParam.Side.Left,Id=2,Overlaying=StyleParam.AxisAnchorId.Y 1,Position=0.15,Anchor=StyleParam.AxisAnchorId.Free)
52+
|> Chart.withY_AxisStyle("second y-axis",Side=StyleParam.Side.Left,Id=2,
53+
Overlaying=StyleParam.AxisAnchorId.Y 1,Position=0.15,Anchor=StyleParam.AxisAnchorId.Free)
5354
(*** include-it:twoYaxesSide ***)
5455
//|> Chart.Show
5556

docs/content/parallel-coords.fsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,26 @@ the position of the vertex on the i-th axis corresponds to the i-th coordinate o
1616
open FSharp.Plotly
1717

1818
let data =
19-
['A',[|1.;4.;|]; 'B',[|3.;1.5;|]; 'C',[|2.;4.;|]; 'D',[|4.;2.;|];]
19+
['A',[|1.;4.;3.4;0.7;|]; 'B',[|3.;1.5;1.7;2.3;|]; 'C',[|2.;4.;3.1;5.|]; 'D',[|4.;2.;2.;4.;|];]
2020

2121

2222
(*** define-output:parcoords1 ***)
23-
Chart.ParallelCoord(data,Color="blue",Ranges=StyleParam.Range.MinMax (1.,5.))
23+
Chart.ParallelCoord(data,Color="blue")
2424
(*** include-it:parcoords1 ***)
2525

2626

2727
// Dynanic object version
2828
let parcoords =
2929
let v = [|
30-
Dimensions.init([|1.;4.;|], StyleParam.Range.MinMax (1.,5.),StyleParam.Range.MinMax (1.,2.),Label='A');
31-
Dimensions.init([|3.;1.5;|], StyleParam.Range.MinMax (1.,5.),Label='B',Tickvals=[|1.5;3.;4.;5.;|]);
32-
Dimensions.init([|2.;4.;|], StyleParam.Range.MinMax (1.,5.),Label='C',Tickvals=[|1.;2.;4.;5.;|],TickText=[|"text 1";"text 2";"text 4";"text 5";|]);
33-
Dimensions.init([|4.;2.;|], StyleParam.Range.MinMax (1.,5.),Label='D');
30+
Dimensions.init([|1.;4.;|],
31+
StyleParam.Range.MinMax (1.,5.),StyleParam.Range.MinMax (1.,2.),Label='A');
32+
Dimensions.init([|3.;1.5;|],
33+
StyleParam.Range.MinMax (1.,5.),Label='B',Tickvals=[|1.5;3.;4.;5.;|]);
34+
Dimensions.init([|2.;4.;|],
35+
StyleParam.Range.MinMax (1.,5.),Label='C',Tickvals=[|1.;2.;4.;5.;|],
36+
TickText=[|"txt 1";"txt 2";"txt 4";"txt 5";|]);
37+
Dimensions.init([|4.;2.;|],
38+
StyleParam.Range.MinMax (1.,5.),Label='D');
3439
|]
3540
let dyn = Trace("parcoords")
3641
dyn?dimensions <- v

docs/content/range-plots.fsx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,29 @@
33
#r "../../bin/FSharp.Plotly.dll"
44

55
(**
6-
# FSharp.Plotly: Pie and Doughnut Charts
6+
# FSharp.Plotly: Range plot Charts
77
8-
*Summary:* This example shows how to create pie and doughnut charts in F#.
8+
*Summary:* This example shows how to create Range plot charts in F#.
99
1010
A pie or a doughnut chart can be created using the `Chart.Pie` and `Chart.Doughnut` functions.
1111
When creating pie or doughnut charts, it is usually desirable to provide both labels and
1212
values.
1313
*)
1414

1515
open FSharp.Plotly
16+
17+
let rnd = System.Random()
18+
19+
let x = [1.; 2.; 3.; 4.; 5.; 6.; 7.; 8.; 9.; 10.; ]
20+
let y = [2.; 1.5; 5.; 1.5; 3.; 2.5; 2.5; 1.5; 3.5; 1.]
21+
22+
let yUpper = y |> List.map (fun v -> v + rnd.NextDouble())
23+
let yLower = y |> List.map (fun v -> v - rnd.NextDouble())
24+
1625

17-
let values = [19; 26; 55;]
18-
let labels = ["Residential"; "Non-Residential"; "Utility"]
19-
20-
(*** define-output:pie1 ***)
21-
Chart.Pie(values,labels)
22-
(*** include-it:pie1 ***)
26+
(*** define-output:range1 ***)
27+
Chart.Range(x,y,yUpper,yLower,Color="grey",RangeColor="lightblue")
28+
(*** include-it:range1 ***)
29+
|> Chart.Show
30+
2331

24-
(*** define-output:doughnut1 ***)
25-
Chart.Doughnut(values,labels,Hole=0.3)
26-
(*** include-it:doughnut1 ***)

0 commit comments

Comments
 (0)