Is there a Haskell library for drawing plots similar to MATLAB, scilab or matplotlib? They all have very simple interfaces, which work like a state machine:
plot
From a glance at matplotlib, I don't think the Haskell ecosystem has anything as feature-rich. However, I've been happy with the results produced by the Chart library. There are also bindings to graphviz (that links one of several) and Ubigraph.
Edit: Responding to the request for plotting (x,y) coordinates:
I'm not entirely clear what you want. If you have a function f :: x -> y
then just use the plotWindow (or PNG, etc) function:
import Graphics.Rendering.Chart.Simple
main = plotWindow [0,0.1..5::Double] sin
If you have a bunch of points, [(x,y)]
, then the same code with a lookup into the list, instead of a continuous function like sin
, should work fine. See the linked page for many many examples.