You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*Summary:* This example shows how to create image charts in F#.
31
+
32
+
There are multiple ways of generating image charts:
33
+
- From 3 Dimensional color collections, where the inner arrays contain 3 (color dimensions without alpha channel) or 4 (color dimensions and alpha channel) values. The color model can be set separately as shown below.
34
+
- From a 2 dimensional collection Plotly.NETs `ARGB` type that represents rgba values
35
+
- From a base64 encoded image data source
36
+
37
+
## Creating Image charts from raw color arrays
38
+
*)
39
+
40
+
// 3d collection containing color values
41
+
openPlotly.NET
42
+
43
+
letcolors=[
44
+
[[0;0;255];[255;255;0];[0;0;255]]
45
+
[[255;0;0];[255;0;255];[255;0;255]]
46
+
[[0;255;0];[0;255;255];[255;0;0]]
47
+
]
48
+
49
+
letimageRaw=
50
+
Chart.Image(Z=colors)
51
+
|> Chart.withTitle "Image chart from raw color component arrays"
52
+
53
+
(*** condition: ipynb ***)
54
+
#if IPYNB
55
+
imageRaw
56
+
#endif// IPYNB
57
+
58
+
(***hide***)
59
+
imageRaw |> GenericChart.toChartHTML
60
+
(***include-it-raw***)
61
+
62
+
(**
63
+
To change the color model to HSL for example, add the `ColorModel` argument:
0 commit comments