I would like to use FSharpChart but there is no basic Chart for what I would like to display : a correlation matrix.
I therefore wrote some functions to draw on a bitmap, along the way that Tomas Petricek does for charting a pie-chart.
Is there any easy way for me to use this to extend FSharpChart ?
let drawCorrelation (udls:seq<'T>) (mapcorrel:Map<('T*'T), float>) =
let mainForm = new Form(Width = 1250, Height = 1050, Text = "Correlation matrix")
let boxChart = new PictureBox(BackColor = Color.White, Dock = DockStyle.Fill,SizeMode = PictureBoxSizeMode.CenterImage)
let matrixbm = new Bitmap(1200, 1000)
let gr = Graphics.FromImage(matrixbm)
gr.Clear(Color.White)
draw2D gr (drawCorrelationInner mapcorrel) 1200 1000 udls mapcorrel (mapcorrel |> Seq.map (fun kv -> kv.Value ) |> Seq.average)
boxChart.Image <- matrixbm
mainForm.Controls.Add(boxChart)
mainForm.Show()