How can I draw text on a haskell chart graphics?

236 views Asked by At

I would like to draw some label besides points on a XY chart drawn using Chart with diagrams backend in Haskell. Eg. I have data like:

data = [("foo", 1,2), ("bar", 1, 3), ... ]

and would like to draw labels foo and bar at or near coordinates (1,2) and (1,3) respectively.

1

There are 1 answers

5
bergey On BEST ANSWER

You can do this using PlotAnnotation. Something like:

toPlot $ def & plot_annotation_values .~ [(1, 2, "foo"), (1, 3, "bar"), ... ]