I'm using the Haskell platform on Windows and I'd like to write a small program which can draw graphs. The graph should be exported to any image format (or even PDF).
What is the easiest way to accomplish this?
(By graph I mean plot.)
By "graph", do you mean the graph theory meaning of graph (nodes and edges) or a plot?
The easiest way to output a graph, in any language, is to pipe dot into Graphviz. Hackage even has a helpful Data.Graphviz package which does some of the low-level work for you, especially if you're already working with the excellent FGL.
The easiest way to output a plot, in any language, is to pipe gnuplot script into gnuplot. Again, there's a Graphics.Gnuplot package on Hackage.
Graphics.Rendering.Chart is quite nice; it does a fair amount more than gnuplot.
Actually, you should just look around Hackage and see what best suits your needs...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With