@@ -13,9 +13,9 @@ let axisStylingChart =
13
13
let x = [ 1. ; 2. ; 3. ; 4. ; 5. ; 6. ; 7. ; 8. ; 9. ; 10. ; ]
14
14
let y = [ 2. ; 1.5 ; 5. ; 1.5 ; 3. ; 2.5 ; 2.5 ; 1.5 ; 3.5 ; 1. ]
15
15
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. ))
19
19
plot1
20
20
21
21
@@ -43,11 +43,11 @@ let multipleAxesChart =
43
43
let y ' = y |> List.map ( fun y -> y * 2. ) |> List.rev
44
44
45
45
let anchoredAt1 =
46
- Chart.Line ( x, y, Name= " anchor 1" , UseDefaults = false )
46
+ Chart.Line ( x = x , y = y, Name= " anchor 1" , UseDefaults = false )
47
47
|> Chart.withAxisAnchor( Y= 1 )
48
48
49
49
let anchoredAt2 =
50
- Chart.Line ( x, y', Name= " anchor 2" , UseDefaults = false )
50
+ Chart.Line ( x = x , y = y', Name= " anchor 2" , UseDefaults = false )
51
51
|> Chart.withAxisAnchor( Y= 2 )
52
52
53
53
let twoYAxes1 =
@@ -57,12 +57,12 @@ let multipleAxesChart =
57
57
]
58
58
|> Chart.combine
59
59
|> Chart.withYAxisStyle(
60
- " axis 1" ,
60
+ TitleText = " axis 1" ,
61
61
Side= StyleParam.Side.Left,
62
62
Id= StyleParam.SubPlotId.YAxis 1
63
63
)
64
64
|> Chart.withYAxisStyle(
65
- " axis2" ,
65
+ TitleText = " axis2" ,
66
66
Side= StyleParam.Side.Right,
67
67
Id= StyleParam.SubPlotId.YAxis 2 ,
68
68
Overlaying= StyleParam.LinearAxisId.Y 1
@@ -84,7 +84,7 @@ let errorBarsChart =
84
84
let y ' = [ 2. ; 1.5 ; 5. ; 1.5 ; 3. ; 2.5 ; 2.5 ; 1.5 ; 3.5 ; 1. ]
85
85
let xError = [| 0.2 ; 0.3 ; 0.2 ; 0.1 ; 0.2 ; 0.4 ; 0.2 ; 0.08 ; 0.2 ; 0.1 ;|]
86
86
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 )
88
88
|> Chart.withXErrorStyle ( Array= xError, Symmetric= true )
89
89
|> Chart.withYErrorStyle ( Array= yError, Arrayminus = xError)
90
90
@@ -115,25 +115,25 @@ let combinedChart =
115
115
let x = [ 1. ; 2. ; 3. ; 4. ; 5. ; 6. ; 7. ; 8. ; 9. ; 10. ; ]
116
116
let y = [ 2. ; 1.5 ; 5. ; 1.5 ; 3. ; 2.5 ; 2.5 ; 1.5 ; 3.5 ; 1. ]
117
117
[
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 )
120
120
]
121
121
|> Chart.combine
122
122
123
123
let subPlotChart =
124
124
let x = [ 1. ; 2. ; 3. ; 4. ; 5. ; 6. ; 7. ; 8. ; 9. ; 10. ; ]
125
125
let y = [ 2. ; 1.5 ; 5. ; 1.5 ; 3. ; 2.5 ; 2.5 ; 1.5 ; 3.5 ; 1. ]
126
126
[
127
- Chart.Point( x, y, Name= " 1,1" , UseDefaults = false )
127
+ Chart.Point( x = x , y = y, Name= " 1,1" , UseDefaults = false )
128
128
|> Chart.withXAxisStyle " x1"
129
129
|> 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 )
131
131
|> Chart.withXAxisStyle " x2"
132
132
|> 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 )
134
134
|> Chart.withXAxisStyle " x3"
135
135
|> 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 )
137
137
|> Chart.withXAxisStyle " x4"
138
138
|> Chart.withYAxisStyle " y4"
139
139
]
@@ -144,13 +144,13 @@ let singleStackChart =
144
144
let x = [ 1. ; 2. ; 3. ; 4. ; 5. ; 6. ; 7. ; 8. ; 9. ; 10. ; ]
145
145
let y = [ 2. ; 1.5 ; 5. ; 1.5 ; 3. ; 2.5 ; 2.5 ; 1.5 ; 3.5 ; 1. ]
146
146
[
147
- Chart.Point( x, y, UseDefaults = false )
147
+ Chart.Point( x = x , y = y, UseDefaults = false )
148
148
|> Chart.withYAxisStyle( " This title must" )
149
149
150
- Chart.Line( x, y, UseDefaults = false )
150
+ Chart.Line( x = x , y = y, UseDefaults = false )
151
151
|> Chart.withYAxisStyle( " be set on the" , ZeroLine= false )
152
152
153
- Chart.Spline( x, y, UseDefaults = false )
153
+ Chart.Spline( x = x , y = y, UseDefaults = false )
154
154
|> Chart.withYAxisStyle( " respective subplots" , ZeroLine= false )
155
155
]
156
156
|> Chart.SingleStack( Pattern = StyleParam.LayoutGridPattern.Coupled)
@@ -161,15 +161,15 @@ let singleStackChart =
161
161
162
162
let multiTraceGrid =
163
163
[
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 )
170
170
[
171
171
Chart.Carpet(
172
- " contour" ,
172
+ carpetId = " contour" ,
173
173
A = [ 0. ; 1. ; 2. ; 3. ; 0. ; 1. ; 2. ; 3. ; 0. ; 1. ; 2. ; 3. ],
174
174
B = [ 4. ; 4. ; 4. ; 4. ; 5. ; 5. ; 5. ; 5. ; 6. ; 6. ; 6. ; 6. ],
175
175
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 =
190
190
Opacity = 0.75
191
191
)
192
192
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" ,
195
195
A = [ 0 ; 1 ; 2 ; 3 ; 0 ; 1 ; 2 ; 3 ; 0 ; 1 ; 2 ; 3 ],
196
196
B = [ 4 ; 4 ; 4 ; 4 ; 5 ; 5 ; 5 ; 5 ; 6 ; 6 ; 6 ; 6 ],
197
197
UseDefaults = false ,
@@ -201,10 +201,10 @@ let multiTraceGrid =
201
201
)
202
202
]
203
203
|> Chart.combine
204
- Chart.Pie([ 10 ; 40 ; 50 ;], Name = " Domain" , UseDefaults = false )
204
+ Chart.Pie( values = [ 10 ; 40 ; 50 ;], Name = " Domain" , UseDefaults = false )
205
205
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. ],
208
208
sizes = [ 10 ; 20 ; 30 ; 40 ],
209
209
MultiText=[ " one" ; " two" ; " three" ; " four" ; " five" ; " six" ; " seven" ],
210
210
TextPosition= StyleParam.TextPosition.TopCenter,
@@ -214,8 +214,8 @@ let multiTraceGrid =
214
214
[
215
215
// you can use nested combined charts, but they have to have the same trace type (Cartesian2D in this case)
216
216
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 );
219
219
]
220
220
|> Chart.combine
221
221
]
@@ -224,16 +224,16 @@ let multiTraceGrid =
224
224
225
225
let multiTraceSingleStack =
226
226
[
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))
232
232
[
233
233
// you can use nested combined charts, but they have to have the same trace type (Cartesian2D in this case)
234
234
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 );
237
237
]
238
238
|> Chart.combine
239
239
]
@@ -288,7 +288,7 @@ let shapesChart =
288
288
let y ' = [ 2. ; 1.5 ; 5. ; 1.5 ; 3. ; 2.5 ; 2.5 ; 1.5 ; 3.5 ; 1. ]
289
289
let s1 = Shape.init ( ShapeType= StyleParam.ShapeType.Rectangle, X0= 2. , X1= 4. , Y0= 3. , Y1= 4. , Opacity= 0.3 , FillColor= Color.fromHex " #d3d3d3" )
290
290
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 )
292
292
|> Chart.withShapes([ s1; s2])
293
293
294
294
@@ -312,7 +312,7 @@ let displayOptionsChartDescriptionChart =
312
312
h3 [] [ str " Hello" ]
313
313
p [] [ str " F#" ]
314
314
]
315
- Chart.Point( x, y, Name= " desc1" , UseDefaults = false )
315
+ Chart.Point( x = x , y = y, Name= " desc1" , UseDefaults = false )
316
316
|> Chart.withDescription( description1)
317
317
318
318
let additionalHeadTagsChart =
@@ -330,15 +330,15 @@ let additionalHeadTagsChart =
330
330
h1 [_ class " title" ] [ str " I am heading" ]
331
331
bulmaHero
332
332
]
333
- Chart.Point( x, y, Name= " desc3" , UseDefaults = false )
333
+ Chart.Point( x = x , y = y, Name= " desc3" , UseDefaults = false )
334
334
|> Chart.withDescription description3
335
335
// Add reference to the bulma css framework
336
336
|> Chart.withAdditionalHeadTags [ link [_ rel " stylesheet" ; _ href " https://cdn.jsdelivr.net/npm/bulma@0.9.2/css/bulma.min.css" ]]
337
337
338
338
let mathtexv3Chart =
339
339
[
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 )
342
342
]
343
343
|> Chart.combine
344
344
|> Chart.withTitle @" $\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$"
@@ -347,8 +347,8 @@ let mathtexv3Chart =
347
347
348
348
let mathtexv2Chart =
349
349
[
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 )
352
352
]
353
353
|> Chart.combine
354
354
|> Chart.withTitle @" $\beta_{1c} = 25 \pm 11 \text{ km s}^{-1}$"
0 commit comments