Skip to content

Commit b080b9b

Browse files
authored
Merge pull request #220 from plotly/dist-improvements
2 parents e1266d7 + a7e7473 commit b080b9b

File tree

18 files changed

+1189
-639
lines changed

18 files changed

+1189
-639
lines changed

docs/00_1_image-export.fsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ open Plotly.NET
6565
open Plotly.NET.ImageExport
6666

6767
let exampleChart =
68-
Chart.Histogram2dContour(
68+
Chart.Histogram2DContour(
6969
[1.;2.;2.;4.;5.],
7070
[1.;2.;2.;4.;5.]
7171
)

docs/01_2_multiple-charts.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ let multipleTraceTypesGrid =
260260
[
261261
// you can use nested combined charts, but they have to have the same trace type (Cartesian2D in this case)
262262
let y = [2.; 1.5; 5.; 1.5; 2.; 2.5; 2.1; 2.5; 1.5; 1.;2.; 1.5; 5.; 1.5; 3.; 2.5; 2.5; 1.5; 3.5; 1.]
263-
Chart.BoxPlot("y" ,y,Name="bin1",Jitter=0.1,Boxpoints=StyleParam.Boxpoints.All);
264-
Chart.BoxPlot("y'",y,Name="bin2",Jitter=0.1,Boxpoints=StyleParam.Boxpoints.All);
263+
Chart.BoxPlot("y" ,y,Name="bin1",Jitter=0.1,BoxPoints=StyleParam.BoxPoints.All);
264+
Chart.BoxPlot("y'",y,Name="bin2",Jitter=0.1,BoxPoints=StyleParam.BoxPoints.All);
265265
]
266266
|> Chart.combine
267267
]

docs/04_1_box-plots.fsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Outliers may be plotted as individual points.
4545
*)
4646

4747
let box1 =
48-
Chart.BoxPlot(x,y,Jitter=0.1,Boxpoints=StyleParam.Boxpoints.All)
48+
Chart.BoxPlot(x,y,Jitter=0.1,BoxPoints=StyleParam.BoxPoints.All)
4949

5050
(*** condition: ipynb ***)
5151
#if IPYNB
@@ -60,7 +60,7 @@ box1 |> GenericChart.toChartHTML
6060
By swapping x and y plus using `StyleParam.Orientation.Horizontal` we can flip the chart horizontaly.
6161
*)
6262
let box2 =
63-
Chart.BoxPlot(y,x,Jitter=0.1,Boxpoints=StyleParam.Boxpoints.All,Orientation=StyleParam.Orientation.Horizontal)
63+
Chart.BoxPlot(y,x,Jitter=0.1,BoxPoints=StyleParam.BoxPoints.All,Orientation=StyleParam.Orientation.Horizontal)
6464

6565
(*** condition: ipynb ***)
6666
#if IPYNB
@@ -79,8 +79,8 @@ let y' = [2.; 1.5; 5.; 1.5; 2.; 2.5; 2.1; 2.5; 1.5; 1.;2.; 1.5; 5.; 1.5; 3.; 2.
7979

8080
let box3 =
8181
[
82-
Chart.BoxPlot("y" ,y,Name="bin1",Jitter=0.1,Boxpoints=StyleParam.Boxpoints.All);
83-
Chart.BoxPlot("y'",y',Name="bin2",Jitter=0.1,Boxpoints=StyleParam.Boxpoints.All);
82+
Chart.BoxPlot("y" ,y,Name="bin1",Jitter=0.1,BoxPoints=StyleParam.BoxPoints.All);
83+
Chart.BoxPlot("y'",y',Name="bin2",Jitter=0.1,BoxPoints=StyleParam.BoxPoints.All);
8484
]
8585
|> Chart.combine
8686

docs/04_2_violin-plots.fsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ data at different values.
4747
let violin1 =
4848
Chart.Violin (
4949
x,y,
50-
Points=StyleParam.Jitterpoints.All
50+
Points=StyleParam.JitterPoints.All
5151
)
5252

5353
(*** condition: ipynb ***)
@@ -68,9 +68,9 @@ let violin2 =
6868
Chart.Violin(
6969
y,x,
7070
Jitter=0.1,
71-
Points=StyleParam.Jitterpoints.All,
71+
Points=StyleParam.JitterPoints.All,
7272
Orientation=StyleParam.Orientation.Horizontal,
73-
Meanline=Meanline.init(Visible=true)
73+
MeanLine=MeanLine.init(Visible=true)
7474
)
7575

7676
(*** condition: ipynb ***)
@@ -90,8 +90,8 @@ let y' = [2.; 1.5; 5.; 1.5; 2.; 2.5; 2.1; 2.5; 1.5; 1.;2.; 1.5; 5.; 1.5; 3.; 2.
9090

9191
let violin3 =
9292
[
93-
Chart.Violin ("y" ,y,Name="bin1",Jitter=0.1,Points=StyleParam.Jitterpoints.All);
94-
Chart.Violin ("y'",y',Name="bin2",Jitter=0.1,Points=StyleParam.Jitterpoints.All);
93+
Chart.Violin ("y" ,y,Name="bin1",Jitter=0.1,Points=StyleParam.JitterPoints.All);
94+
Chart.Violin ("y'",y',Name="bin2",Jitter=0.1,Points=StyleParam.JitterPoints.All);
9595
]
9696
|> Chart.combine
9797

docs/04_4_2d-histograms.fsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ let x = Array.init n (fun i -> ((step i)**3.) + (0.3 * (normal (rnd) 0. 2.) ))
5757
let y = Array.init n (fun i -> ((step i)**6.) + (0.3 * (normal (rnd) 0. 2.) ))
5858

5959
(**
60-
A Histogram2d chart can be created using the `Chart.Histogram2d` or `Chart.Histogram2dContour` functions.
60+
A Histogram2D chart can be created using the `Chart.Histogram2D` or `Chart.Histogram2DContour` functions.
6161
*)
6262

6363
let histogramContour =
6464
[
65-
Chart.Histogram2dContour (x,y,Line=Line.init(Width=0.))
65+
Chart.Histogram2DContour (x,y,Line=Line.init(Width=0.))
6666
Chart.Point(x,y,Opacity=0.3)
6767
]
6868
|> Chart.combine
@@ -76,14 +76,14 @@ histogramContour
7676
histogramContour |> GenericChart.toChartHTML
7777
(*** include-it-raw ***)
7878

79-
let histogram2d =
80-
Chart.Histogram2d (x,y)
79+
let histogram2D =
80+
Chart.Histogram2D (x,y)
8181

8282
(*** condition: ipynb ***)
8383
#if IPYNB
84-
histogram2d
84+
histogram2D
8585
#endif // IPYNB
8686

8787
(***hide***)
88-
histogram2d |> GenericChart.toChartHTML
88+
histogram2D |> GenericChart.toChartHTML
8989
(*** include-it-raw ***)

src/Plotly.NET/ChartAPI/Chart.fs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ type Chart =
296296
static member withX_Axis(xAxis:LinearAxis,[<Optional;DefaultParameterValue(null)>] ?Id : StyleParam.SubPlotId) =
297297
Chart.withXAxis(xAxis, ?Id = Id)
298298

299-
// Sets x-Axis of 2d and 3d- Charts
299+
// Sets x-Axis of 2D and 3d- Charts
300300
[<CompiledName("WithXAxis")>]
301301
static member withXAxis(xAxis:LinearAxis,[<Optional;DefaultParameterValue(null)>] ?Id: StyleParam.SubPlotId) =
302302
fun (ch:GenericChart) ->
@@ -358,7 +358,7 @@ type Chart =
358358
?Anchor = Anchor)
359359

360360

361-
// Sets x-Axis of 2d and 3d- Charts
361+
// Sets x-Axis of 2D and 3d- Charts
362362
[<CompiledName("WithXAxisStyle")>]
363363
static member withXAxisStyle(title,
364364
[<Optional;DefaultParameterValue(null)>] ?TitleFont,
@@ -396,7 +396,7 @@ type Chart =
396396
static member withY_Axis(yAxis:LinearAxis,[<Optional;DefaultParameterValue(null)>] ?Id: StyleParam.SubPlotId) =
397397
Chart.withYAxis(yAxis, ?Id = Id)
398398

399-
// Sets y-Axis of 2d and 3d- Charts
399+
// Sets y-Axis of 2D and 3d- Charts
400400
[<CompiledName("WithYAxis")>]
401401
static member withYAxis(yAxis:LinearAxis,[<Optional;DefaultParameterValue(null)>] ?Id: StyleParam.SubPlotId) =
402402
fun (ch:GenericChart) ->
@@ -559,7 +559,7 @@ type Chart =
559559
[<Optional;DefaultParameterValue(null)>] ?BGColor) =
560560
let colorbar = ColorBar.init(Title=title,?Len = Length,?OutlineColor=OutlineColor,?BGColor=BGColor,?BorderColor=BorderColor)
561561
Chart.withColorBar(colorbar)
562-
//// Sets second x-Axis of 2d- Charts
562+
//// Sets second x-Axis of 2D- Charts
563563
//static member withX_Axis2(xAxis2:Axis.LinearAxis) =
564564
// (fun (ch:GenericChart) ->
565565
// let layout =
@@ -569,14 +569,14 @@ type Chart =
569569
// )
570570

571571

572-
// // Sets second x-Axis of 2d- Charts
572+
// // Sets second x-Axis of 2D- Charts
573573
//static member withX_Axis2Style(title,?MinMax,?Showgrid,?Showline) =
574574
// let range = if MinMax.IsSome then Some (StyleParam.Range.MinMax (MinMax.Value)) else None
575575
// let xaxis = Axis.LinearAxis.init(Title=title,?Range=range,?Showgrid=Showgrid,?Showline=Showline,Side=StyleParam.Side.Top)
576576
// Chart.withX_Axis2(xaxis)
577577

578578

579-
//// Sets second y-Axis of 2d- Charts
579+
//// Sets second y-Axis of 2D- Charts
580580
//static member withY_Axis2(yAxis2:Axis.LinearAxis) =
581581
// (fun (ch:GenericChart) ->
582582
// let layout =
@@ -586,7 +586,7 @@ type Chart =
586586
// )
587587

588588

589-
// // Sets second x-Axis of 2d- Charts
589+
// // Sets second x-Axis of 2D- Charts
590590
//static member withY_Axis2Style(title,?MinMax,?Showgrid,?Showline) =
591591
// let range = if MinMax.IsSome then Some (StyleParam.Range.MinMax (MinMax.Value)) else None
592592
// let yaxis = Axis.LinearAxis.init(Title=title,?Range=range,?Showgrid=Showgrid,?Showline=Showline,Side=StyleParam.Side.Right)

0 commit comments

Comments
 (0)