Haskell plotting library similar to MATLAB

后端 未结 5 1290
天涯浪人
天涯浪人 2021-02-02 09:00

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         


        
5条回答
  •  时光取名叫无心
    2021-02-02 09:26

    Try gnuplot. It's cross-language, quite fast at scale, and always a nice thing to know, even if it is old. These instructions should get you a working example:

    cabal install gnuplot
    sudo apt-get install gnuplot-x11
    
    ghci
    GHCi, version 7.4.1: http://www.haskell.org/ghc/  :? for help
    Loading package ghc-prim ... linking ... done.
    Loading package integer-gmp ... linking ... done.
    Loading package base ... linking ... done.
    h> import Graphics.Gnuplot.Simple
    h> plotFunc [] (linearScale 1000 (-20,20)) (\x -> sin x / x)
    

提交回复
热议问题