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
2 changes: 1 addition & 1 deletion docs/00_1_image-export.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,7 @@ open Plotly.NET
open Plotly.NET.ImageExport

let exampleChart =
Chart.Histogram2dContour(
Chart.Histogram2DContour(
[1.;2.;2.;4.;5.],
[1.;2.;2.;4.;5.]
)
Expand Down
4 changes: 2 additions & 2 deletions docs/01_2_multiple-charts.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -260,8 +260,8 @@ let multipleTraceTypesGrid =
[
// you can use nested combined charts, but they have to have the same trace type (Cartesian2D in this case)
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.]
Chart.BoxPlot("y" ,y,Name="bin1",Jitter=0.1,Boxpoints=StyleParam.Boxpoints.All);
Chart.BoxPlot("y'",y,Name="bin2",Jitter=0.1,Boxpoints=StyleParam.Boxpoints.All);
Chart.BoxPlot("y" ,y,Name="bin1",Jitter=0.1,BoxPoints=StyleParam.BoxPoints.All);
Chart.BoxPlot("y'",y,Name="bin2",Jitter=0.1,BoxPoints=StyleParam.BoxPoints.All);
]
|> Chart.combine
]
Expand Down
8 changes: 4 additions & 4 deletions docs/04_1_box-plots.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -45,7 +45,7 @@ Outliers may be plotted as individual points.
*)

let box1 =
Chart.BoxPlot(x,y,Jitter=0.1,Boxpoints=StyleParam.Boxpoints.All)
Chart.BoxPlot(x,y,Jitter=0.1,BoxPoints=StyleParam.BoxPoints.All)

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

(*** condition: ipynb ***)
#if IPYNB
Expand All@@ -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.

let box3 =
[
Chart.BoxPlot("y" ,y,Name="bin1",Jitter=0.1,Boxpoints=StyleParam.Boxpoints.All);
Chart.BoxPlot("y'",y',Name="bin2",Jitter=0.1,Boxpoints=StyleParam.Boxpoints.All);
Chart.BoxPlot("y" ,y,Name="bin1",Jitter=0.1,BoxPoints=StyleParam.BoxPoints.All);
Chart.BoxPlot("y'",y',Name="bin2",Jitter=0.1,BoxPoints=StyleParam.BoxPoints.All);
]
|> Chart.combine

Expand Down
10 changes: 5 additions & 5 deletions docs/04_2_violin-plots.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,7 +47,7 @@ data at different values.
let violin1 =
Chart.Violin (
x,y,
Points=StyleParam.Jitterpoints.All
Points=StyleParam.JitterPoints.All
)

(*** condition: ipynb ***)
Expand All@@ -68,9 +68,9 @@ let violin2 =
Chart.Violin(
y,x,
Jitter=0.1,
Points=StyleParam.Jitterpoints.All,
Points=StyleParam.JitterPoints.All,
Orientation=StyleParam.Orientation.Horizontal,
Meanline=Meanline.init(Visible=true)
MeanLine=MeanLine.init(Visible=true)
)

(*** condition: ipynb ***)
Expand All@@ -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.

let violin3 =
[
Chart.Violin ("y" ,y,Name="bin1",Jitter=0.1,Points=StyleParam.Jitterpoints.All);
Chart.Violin ("y'",y',Name="bin2",Jitter=0.1,Points=StyleParam.Jitterpoints.All);
Chart.Violin ("y" ,y,Name="bin1",Jitter=0.1,Points=StyleParam.JitterPoints.All);
Chart.Violin ("y'",y',Name="bin2",Jitter=0.1,Points=StyleParam.JitterPoints.All);
]
|> Chart.combine

Expand Down
12 changes: 6 additions & 6 deletions docs/04_4_2d-histograms.fsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -57,12 +57,12 @@ let x = Array.init n (fun i -> ((step i)**3.) + (0.3 * (normal (rnd) 0. 2.) ))
let y = Array.init n (fun i -> ((step i)**6.) + (0.3 * (normal (rnd) 0. 2.) ))

(**
A Histogram2d chart can be created using the `Chart.Histogram2d` or `Chart.Histogram2dContour` functions.
A Histogram2D chart can be created using the `Chart.Histogram2D` or `Chart.Histogram2DContour` functions.
*)

let histogramContour =
[
Chart.Histogram2dContour (x,y,Line=Line.init(Width=0.))
Chart.Histogram2DContour (x,y,Line=Line.init(Width=0.))
Chart.Point(x,y,Opacity=0.3)
]
|> Chart.combine
Expand All@@ -76,14 +76,14 @@ histogramContour
histogramContour |> GenericChart.toChartHTML
(*** include-it-raw ***)

let histogram2d =
Chart.Histogram2d (x,y)
let histogram2D =
Chart.Histogram2D (x,y)

(*** condition: ipynb ***)
#if IPYNB
histogram2d
histogram2D
#endif // IPYNB

(***hide***)
histogram2d |> GenericChart.toChartHTML
histogram2D |> GenericChart.toChartHTML
(*** include-it-raw ***)
14 changes: 7 additions & 7 deletions src/Plotly.NET/ChartAPI/Chart.fs
Original file line numberDiff line numberDiff line change
Expand Up@@ -296,7 +296,7 @@ type Chart =
static member withX_Axis(xAxis:LinearAxis,[<Optional;DefaultParameterValue(null)>] ?Id : StyleParam.SubPlotId) =
Chart.withXAxis(xAxis, ?Id = Id)

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


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

// Sets y-Axis of 2d and 3d- Charts
// Sets y-Axis of 2D and 3d- Charts
[<CompiledName("WithYAxis")>]
static member withYAxis(yAxis:LinearAxis,[<Optional;DefaultParameterValue(null)>] ?Id: StyleParam.SubPlotId) =
fun (ch:GenericChart) ->
Expand DownExpand Up@@ -559,7 +559,7 @@ type Chart =
[<Optional;DefaultParameterValue(null)>] ?BGColor) =
let colorbar = ColorBar.init(Title=title,?Len = Length,?OutlineColor=OutlineColor,?BGColor=BGColor,?BorderColor=BorderColor)
Chart.withColorBar(colorbar)
//// Sets second x-Axis of 2d- Charts
//// Sets second x-Axis of 2D- Charts
//static member withX_Axis2(xAxis2:Axis.LinearAxis) =
// (fun (ch:GenericChart) ->
// let layout =
Expand All@@ -569,14 +569,14 @@ type Chart =
// )


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


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


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