FSharp.Charting icon indicating copy to clipboard operation
FSharp.Charting copied to clipboard

[Docs] Add an example for a sclatter plot with labels on the points

Open ovatsus opened this issue 12 years ago • 1 comments

It's not obvious how to do it at first thought, and it's a very common plot

ovatsus avatar Jul 09 '13 10:07 ovatsus

Let me rephrase that. I's obvious how to show the labels Chart.Point(points, Labels=labels), but usually the output of that is not what you wanted:

image

Most of the time you want something like this instead:

image

and to obtain that you need something like this:

points
|> Seq.zip labels
|> Seq.groupBy fst
|> Seq.map (fun (label, points) -> Chart.Point(Seq.map snd points).WithDataPointLabels(label))
|> Chart.Combine

ovatsus avatar Jul 09 '13 10:07 ovatsus