@@ -13,9 +13,9 @@ let axisStylingChart =
1313 let x = [ 1. ; 2. ; 3. ; 4. ; 5. ; 6. ; 7. ; 8. ; 9. ; 10. ; ]
1414 let y = [ 2. ; 1.5 ; 5. ; 1.5 ; 3. ; 2.5 ; 2.5 ; 1.5 ; 3.5 ; 1. ]
1515 let plot1 =
16- Chart.Point( x, y, UseDefaults = false )
17- |> Chart.withXAxisStyle ( " X axis title quack quack" , MinMax = (- 1. , 10. ))
18- |> Chart.withYAxisStyle ( " Y axis title boo foo" , MinMax = (- 1. , 10. ))
16+ Chart.Point( x = x , y = y, UseDefaults = false )
17+ |> Chart.withXAxisStyle ( TitleText = " X axis title quack quack" , MinMax = (- 1. , 10. ))
18+ |> Chart.withYAxisStyle ( TitleText = " Y axis title boo foo" , MinMax = (- 1. , 10. ))
1919 plot1
2020
2121
@@ -43,11 +43,11 @@ let multipleAxesChart =
4343 let y ' = y |> List.map ( fun y -> y * 2. ) |> List.rev
4444
4545 let anchoredAt1 =
46- Chart.Line ( x, y, Name= " anchor 1" , UseDefaults = false )
46+ Chart.Line ( x = x , y = y, Name= " anchor 1" , UseDefaults = false )
4747 |> Chart.withAxisAnchor( Y= 1 )
4848
4949 let anchoredAt2 =
50- Chart.Line ( x, y', Name= " anchor 2" , UseDefaults = false )
50+ Chart.Line ( x = x , y = y', Name= " anchor 2" , UseDefaults = false )
5151 |> Chart.withAxisAnchor( Y= 2 )
5252
5353 let twoYAxes1 =
@@ -57,12 +57,12 @@ let multipleAxesChart =
5757 ]
5858 |> Chart.combine
5959 |> Chart.withYAxisStyle(
60- " axis 1" ,
60+ TitleText = " axis 1" ,
6161 Side= StyleParam.Side.Left,
6262 Id= StyleParam.SubPlotId.YAxis 1
6363 )
6464 |> Chart.withYAxisStyle(
65- " axis2" ,
65+ TitleText = " axis2" ,
6666 Side= StyleParam.Side.Right,
6767 Id= StyleParam.SubPlotId.YAxis 2 ,
6868 Overlaying= StyleParam.LinearAxisId.Y 1
@@ -84,7 +84,7 @@ let errorBarsChart =
8484 let y ' = [ 2. ; 1.5 ; 5. ; 1.5 ; 3. ; 2.5 ; 2.5 ; 1.5 ; 3.5 ; 1. ]
8585 let xError = [| 0.2 ; 0.3 ; 0.2 ; 0.1 ; 0.2 ; 0.4 ; 0.2 ; 0.08 ; 0.2 ; 0.1 ;|]
8686 let yError = [| 0.3 ; 0.2 ; 0.1 ; 0.4 ; 0.2 ; 0.4 ; 0.1 ; 0.18 ; 0.02 ; 0.2 ;|]
87- Chart.Point( x, y', Name= " points with errors" , UseDefaults = false )
87+ Chart.Point( x = x , y = y', Name= " points with errors" , UseDefaults = false )
8888 |> Chart.withXErrorStyle ( Array= xError, Symmetric= true )
8989 |> Chart.withYErrorStyle ( Array= yError, Arrayminus = xError)
9090
@@ -115,25 +115,25 @@ let combinedChart =
115115 let x = [ 1. ; 2. ; 3. ; 4. ; 5. ; 6. ; 7. ; 8. ; 9. ; 10. ; ]
116116 let y = [ 2. ; 1.5 ; 5. ; 1.5 ; 3. ; 2.5 ; 2.5 ; 1.5 ; 3.5 ; 1. ]
117117 [
118- Chart.Line( x, y, Name= " first" , UseDefaults = false )
119- Chart.Line( y , x, Name= " second" , UseDefaults = false )
118+ Chart.Line( x = x , y = y, Name= " first" , UseDefaults = false )
119+ Chart.Line( x = y , y = x, Name= " second" , UseDefaults = false )
120120 ]
121121 |> Chart.combine
122122
123123let subPlotChart =
124124 let x = [ 1. ; 2. ; 3. ; 4. ; 5. ; 6. ; 7. ; 8. ; 9. ; 10. ; ]
125125 let y = [ 2. ; 1.5 ; 5. ; 1.5 ; 3. ; 2.5 ; 2.5 ; 1.5 ; 3.5 ; 1. ]
126126 [
127- Chart.Point( x, y, Name= " 1,1" , UseDefaults = false )
127+ Chart.Point( x = x , y = y, Name= " 1,1" , UseDefaults = false )
128128 |> Chart.withXAxisStyle " x1"
129129 |> Chart.withYAxisStyle " y1"
130- Chart.Line( x, y, Name= " 1,2" , UseDefaults = false )
130+ Chart.Line( x = x , y = y, Name= " 1,2" , UseDefaults = false )
131131 |> Chart.withXAxisStyle " x2"
132132 |> Chart.withYAxisStyle " y2"
133- Chart.Spline( x, y, Name= " 2,1" , UseDefaults = false )
133+ Chart.Spline( x = x , y = y, Name= " 2,1" , UseDefaults = false )
134134 |> Chart.withXAxisStyle " x3"
135135 |> Chart.withYAxisStyle " y3"
136- Chart.Point( x, y, Name= " 2,2" , UseDefaults = false )
136+ Chart.Point( x = x , y = y, Name= " 2,2" , UseDefaults = false )
137137 |> Chart.withXAxisStyle " x4"
138138 |> Chart.withYAxisStyle " y4"
139139 ]
@@ -144,13 +144,13 @@ let singleStackChart =
144144 let x = [ 1. ; 2. ; 3. ; 4. ; 5. ; 6. ; 7. ; 8. ; 9. ; 10. ; ]
145145 let y = [ 2. ; 1.5 ; 5. ; 1.5 ; 3. ; 2.5 ; 2.5 ; 1.5 ; 3.5 ; 1. ]
146146 [
147- Chart.Point( x, y, UseDefaults = false )
147+ Chart.Point( x = x , y = y, UseDefaults = false )
148148 |> Chart.withYAxisStyle( " This title must" )
149149
150- Chart.Line( x, y, UseDefaults = false )
150+ Chart.Line( x = x , y = y, UseDefaults = false )
151151 |> Chart.withYAxisStyle( " be set on the" , ZeroLine= false )
152152
153- Chart.Spline( x, y, UseDefaults = false )
153+ Chart.Spline( x = x , y = y, UseDefaults = false )
154154 |> Chart.withYAxisStyle( " respective subplots" , ZeroLine= false )
155155 ]
156156 |> Chart.SingleStack( Pattern = StyleParam.LayoutGridPattern.Coupled)
@@ -161,15 +161,15 @@ let singleStackChart =
161161
162162let multiTraceGrid =
163163 [
164- Chart.Point([ 1 , 2 ; 2 , 3 ], Name = " 2D Cartesian" , UseDefaults = false )
165- Chart.Point3D([ 1 , 3 , 2 ], Name = " 3D Cartesian" , UseDefaults = false )
166- Chart.PointPolar([ 10 , 20 ], Name = " Polar" , UseDefaults = false )
167- Chart.PointGeo([ 1 , 2 ], Name = " Geo" , UseDefaults = false )
168- Chart.PointMapbox([ 1 , 2 ], Name = " MapBox" , UseDefaults = false ) |> Chart.withMapbox( Mapbox.init( Style = StyleParam.MapboxStyle.OpenStreetMap))
169- Chart.PointTernary([ 1 , 2 , 3 ; 2 , 3 , 4 ], Name = " Ternary" , UseDefaults = false )
164+ Chart.Point( xy = [ 1 , 2 ; 2 , 3 ], Name = " 2D Cartesian" , UseDefaults = false )
165+ Chart.Point3D( xyz = [ 1 , 3 , 2 ], Name = " 3D Cartesian" , UseDefaults = false )
166+ Chart.PointPolar( rTheta = [ 10 , 20 ], Name = " Polar" , UseDefaults = false )
167+ Chart.PointGeo( lonlat = [ 1 , 2 ], Name = " Geo" , UseDefaults = false )
168+ Chart.PointMapbox( lonlat = [ 1 , 2 ], Name = " MapBox" , UseDefaults = false ) |> Chart.withMapbox( Mapbox.init( Style = StyleParam.MapboxStyle.OpenStreetMap))
169+ Chart.PointTernary( abc = [ 1 , 2 , 3 ; 2 , 3 , 4 ], Name = " Ternary" , UseDefaults = false )
170170 [
171171 Chart.Carpet(
172- " contour" ,
172+ carpetId = " contour" ,
173173 A = [ 0. ; 1. ; 2. ; 3. ; 0. ; 1. ; 2. ; 3. ; 0. ; 1. ; 2. ; 3. ],
174174 B = [ 4. ; 4. ; 4. ; 4. ; 5. ; 5. ; 5. ; 5. ; 6. ; 6. ; 6. ; 6. ],
175175 X = [ 2. ; 3. ; 4. ; 5. ; 2.2 ; 3.1 ; 4.1 ; 5.1 ; 1.5 ; 2.5 ; 3.5 ; 4.5 ],
@@ -190,8 +190,8 @@ let multiTraceGrid =
190190 Opacity = 0.75
191191 )
192192 Chart.ContourCarpet(
193- [ 1. ; 1.96 ; 2.56 ; 3.0625 ; 4. ; 5.0625 ; 1. ; 7.5625 ; 9. ; 12.25 ; 15.21 ; 14.0625 ],
194- " contour" ,
193+ z = [ 1. ; 1.96 ; 2.56 ; 3.0625 ; 4. ; 5.0625 ; 1. ; 7.5625 ; 9. ; 12.25 ; 15.21 ; 14.0625 ],
194+ carpetAnchorId = " contour" ,
195195 A = [ 0 ; 1 ; 2 ; 3 ; 0 ; 1 ; 2 ; 3 ; 0 ; 1 ; 2 ; 3 ],
196196 B = [ 4 ; 4 ; 4 ; 4 ; 5 ; 5 ; 5 ; 5 ; 6 ; 6 ; 6 ; 6 ],
197197 UseDefaults = false ,
@@ -201,10 +201,10 @@ let multiTraceGrid =
201201 )
202202 ]
203203 |> Chart.combine
204- Chart.Pie([ 10 ; 40 ; 50 ;], Name = " Domain" , UseDefaults = false )
204+ Chart.Pie( values = [ 10 ; 40 ; 50 ;], Name = " Domain" , UseDefaults = false )
205205 Chart.BubbleSmith(
206- [ 0.5 ; 1. ; 2. ; 3. ],
207- [ 0.5 ; 1. ; 2. ; 3. ],
206+ real = [ 0.5 ; 1. ; 2. ; 3. ],
207+ imag = [ 0.5 ; 1. ; 2. ; 3. ],
208208 sizes = [ 10 ; 20 ; 30 ; 40 ],
209209 MultiText=[ " one" ; " two" ; " three" ; " four" ; " five" ; " six" ; " seven" ],
210210 TextPosition= StyleParam.TextPosition.TopCenter,
@@ -214,8 +214,8 @@ let multiTraceGrid =
214214 [
215215 // you can use nested combined charts, but they have to have the same trace type (Cartesian2D in this case)
216216 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. ]
217- Chart.BoxPlot( " y" , y, Name= " Combined 1" , Jitter= 0.1 , BoxPoints= StyleParam.BoxPoints.All, UseDefaults = false );
218- Chart.BoxPlot( " y'" , y, Name= " Combined 2" , Jitter= 0.1 , BoxPoints= StyleParam.BoxPoints.All, UseDefaults = false );
217+ Chart.BoxPlot( X = " y" , Y = y, Name= " Combined 1" , Jitter= 0.1 , BoxPoints= StyleParam.BoxPoints.All, UseDefaults = false );
218+ Chart.BoxPlot( X = " y'" , Y = y, Name= " Combined 2" , Jitter= 0.1 , BoxPoints= StyleParam.BoxPoints.All, UseDefaults = false );
219219 ]
220220 |> Chart.combine
221221 ]
@@ -224,16 +224,16 @@ let multiTraceGrid =
224224
225225let multiTraceSingleStack =
226226 [
227- Chart.Point([ 1 , 2 ; 2 , 3 ], UseDefaults = false )
228- Chart.PointTernary([ 1 , 2 , 3 ; 2 , 3 , 4 ], UseDefaults = false )
229- Chart.Heatmap([[ 1 ; 2 ];[ 3 ; 4 ]], ShowScale= false , UseDefaults = false )
230- Chart.Point3D([ 1 , 3 , 2 ], UseDefaults = false )
231- Chart.PointMapbox([ 1 , 2 ], UseDefaults = false ) |> Chart.withMapbox( Mapbox.init( Style = StyleParam.MapboxStyle.OpenStreetMap))
227+ Chart.Point( xy = [ 1 , 2 ; 2 , 3 ], UseDefaults = false )
228+ Chart.PointTernary( abc = [ 1 , 2 , 3 ; 2 , 3 , 4 ], UseDefaults = false )
229+ Chart.Heatmap( zData = [[ 1 ; 2 ];[ 3 ; 4 ]], ShowScale= false , UseDefaults = false )
230+ Chart.Point3D( xyz = [ 1 , 3 , 2 ], UseDefaults = false )
231+ Chart.PointMapbox( lonlat = [ 1 , 2 ], UseDefaults = false ) |> Chart.withMapbox( Mapbox.init( Style = StyleParam.MapboxStyle.OpenStreetMap))
232232 [
233233 // you can use nested combined charts, but they have to have the same trace type (Cartesian2D in this case)
234234 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. ]
235- Chart.BoxPlot( " y" , y, Name= " bin1" , Jitter= 0.1 , BoxPoints= StyleParam.BoxPoints.All, UseDefaults = false );
236- Chart.BoxPlot( " y'" , y, Name= " bin2" , Jitter= 0.1 , BoxPoints= StyleParam.BoxPoints.All, UseDefaults = false );
235+ Chart.BoxPlot( X = " y" , Y = y, Name= " bin1" , Jitter= 0.1 , BoxPoints= StyleParam.BoxPoints.All, UseDefaults = false );
236+ Chart.BoxPlot( X = " y'" , Y = y, Name= " bin2" , Jitter= 0.1 , BoxPoints= StyleParam.BoxPoints.All, UseDefaults = false );
237237 ]
238238 |> Chart.combine
239239 ]
@@ -288,7 +288,7 @@ let shapesChart =
288288 let y ' = [ 2. ; 1.5 ; 5. ; 1.5 ; 3. ; 2.5 ; 2.5 ; 1.5 ; 3.5 ; 1. ]
289289 let s1 = Shape.init ( ShapeType= StyleParam.ShapeType.Rectangle, X0= 2. , X1= 4. , Y0= 3. , Y1= 4. , Opacity= 0.3 , FillColor= Color.fromHex " #d3d3d3" )
290290 let s2 = Shape.init ( ShapeType= StyleParam.ShapeType.Rectangle, X0= 5. , X1= 7. , Y0= 3. , Y1= 4. , Opacity= 0.3 , FillColor= Color.fromHex " #d3d3d3" )
291- Chart.Line( x, y', Name= " line" , UseDefaults = false )
291+ Chart.Line( x = x , y = y', Name= " line" , UseDefaults = false )
292292 |> Chart.withShapes([ s1; s2])
293293
294294
@@ -312,7 +312,7 @@ let displayOptionsChartDescriptionChart =
312312 h3 [] [ str " Hello" ]
313313 p [] [ str " F#" ]
314314 ]
315- Chart.Point( x, y, Name= " desc1" , UseDefaults = false )
315+ Chart.Point( x = x , y = y, Name= " desc1" , UseDefaults = false )
316316 |> Chart.withDescription( description1)
317317
318318let additionalHeadTagsChart =
@@ -330,15 +330,15 @@ let additionalHeadTagsChart =
330330 h1 [_ class " title" ] [ str " I am heading" ]
331331 bulmaHero
332332 ]
333- Chart.Point( x, y, Name= " desc3" , UseDefaults = false )
333+ Chart.Point( x = x , y = y, Name= " desc3" , UseDefaults = false )
334334 |> Chart.withDescription description3
335335 // Add reference to the bulma css framework
336336 |> Chart.withAdditionalHeadTags [ link [_ rel " stylesheet" ; _ href " https://cdn.jsdelivr.net/npm/bulma@0.9.2/css/bulma.min.css" ]]
337337
338338let mathtexv3Chart =
339339 [
340- Chart.Point([( 1. , 2. )], @" $\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$" , UseDefaults = false )
341- Chart.Point([( 2. , 4. )], @" $\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$" , UseDefaults = false )
340+ Chart.Point( xy = [( 1. , 2. )], Name = @" $\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$" , UseDefaults = false )
341+ Chart.Point( xy = [( 2. , 4. )], Name = @" $\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$" , UseDefaults = false )
342342 ]
343343 |> Chart.combine
344344 |> Chart.withTitle @" $\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$"
@@ -347,8 +347,8 @@ let mathtexv3Chart =
347347
348348let mathtexv2Chart =
349349 [
350- Chart.Point([( 1. , 2. )], @" $\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$" , UseDefaults = false )
351- Chart.Point([( 2. , 4. )], @" $\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$" , UseDefaults = false )
350+ Chart.Point( xy = [( 1. , 2. )], Name = @" $\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$" , UseDefaults = false )
351+ Chart.Point( xy = [( 2. , 4. )], Name = @" $\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$" , UseDefaults = false )
352352 ]
353353 |> Chart.combine
354354 |> Chart.withTitle @" $\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$"
0 commit comments