Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haskell graph drawing on Windows

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.)

like image 319
Deniz Dogan Avatar asked Jun 04 '09 14:06

Deniz Dogan


1 Answers

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...

like image 190
ephemient Avatar answered Sep 17 '22 13:09

ephemient