@@ -164,6 +164,9 @@ grid3 |> GenericChart.toChartHTML
164
164
(***include-it-raw***)
165
165
166
166
(**
167
+
168
+ #### Coupled axes
169
+
167
170
Use `Pattern=StyleParam.LayoutGridPatter.Coupled` to use one shared x axis per column and one shared y axis per row.
168
171
(Try zooming in the single subplots below)
169
172
*)
@@ -192,6 +195,37 @@ grid4
192
195
grid4 |> GenericChart.toChartHTML
193
196
(***include-it-raw***)
194
197
198
+ (**
199
+
200
+ #### Individual subplot titles
201
+
202
+ You can set individual subplot titles by using the `SubPlotTitles` argument of the `Chart.Grid` function:
203
+ *)
204
+
205
+ let grid5 =
206
+ [ Chart.Point( x = x, y = y, Name = " 1,1" )
207
+ |> Chart.withXAxisStyle " x1"
208
+ |> Chart.withYAxisStyle " y1"
209
+ Chart.Line( x = x, y = y, Name = " 1,2" )
210
+ |> Chart.withXAxisStyle " x2"
211
+ |> Chart.withYAxisStyle " y2"
212
+ Chart.Spline( x = x, y = y, Name = " 2,1" )
213
+ |> Chart.withXAxisStyle " x3"
214
+ |> Chart.withYAxisStyle " y3"
215
+ Chart.Point( x = x, y = y, Name = " 2,2" )
216
+ |> Chart.withXAxisStyle " x4"
217
+ |> Chart.withYAxisStyle " y4" ]
218
+ |> Chart.Grid( 2 , 2 , SubPlotTitles = [ " First" ; " Second" ; " Third" ; " Fourth" ])
219
+
220
+ (*** condition: ipynb ***)
221
+ #if IPYNB
222
+ grid5
223
+ #endif // IPYNB
224
+
225
+ (***hide***)
226
+ grid5 |> GenericChart.toChartHTML
227
+ (***include-it-raw***)
228
+
195
229
(**
196
230
### Chart.SingleStack
197
231
@@ -311,8 +345,23 @@ let multipleTraceTypesGrid =
311
345
Chart.BoxPlot( X = " y" , Y = y, Name = " Combined 1" , Jitter = 0.1 , BoxPoints = StyleParam.BoxPoints.All)
312
346
Chart.BoxPlot( X = " y'" , Y = y, Name = " Combined 2" , Jitter = 0.1 , BoxPoints = StyleParam.BoxPoints.All) ]
313
347
|> Chart.combine ]
314
- |> Chart.Grid( nRows = 4 , nCols = 3 )
315
- |> Chart.withSize ( Width = 1000 , Height = 1000 )
348
+ |> Chart.Grid(
349
+ nRows = 4 ,
350
+ nCols = 3 ,
351
+ SubPlotTitles = [
352
+ " 2D Cartesian"
353
+ " 3D Cartesian"
354
+ " Polar"
355
+ " Geo"
356
+ " MapBox"
357
+ " Ternary"
358
+ " Carpet"
359
+ " Pie"
360
+ " BubbleSmith"
361
+ " Combined 1"
362
+ ]
363
+ )
364
+ |> Chart.withSize ( Width = 1000 , Height = 1500 )
316
365
317
366
(*** condition: ipynb ***)
318
367
#if IPYNB
@@ -327,7 +376,7 @@ multipleTraceTypesGrid |> GenericChart.toChartHTML
327
376
If you are not sure if trace types are compatible, look at the `TraceIDs`:
328
377
*)
329
378
330
- let pointType = Chart.Point( xy = [ 1 , 2 ]) |> GenericChart.getTraceID
379
+ Chart.Point( xy = [ 1 , 2 ]) |> GenericChart.getTraceID
331
380
(***include-it***)
332
381
333
382
[ Chart.Point( xy = [ 1 , 2 ]); Chart.PointTernary( abc = [ 1 , 2 , 3 ]) ]
0 commit comments