I've been using the Glasgow Haskell Compiler (GHC) to learn Haskell. I installed the gnuplot package using Cabal (I used the command cabal install --lib gnuplot
). I can load the gnuplot module, however, when I try to use gnuplot, it doesn't display the function plot:
ghci> :m Graphics.Gnuplot.Simple
ghci> plotFunc [][1.0,1.01..10.0] sin
ghci> ghc-9.2.8.exe: gnuplot: readCreateProcessWithExitCode: does not exist (No such file or directory)
I've already tried uninstalling and reinstalling the package, which doesn't solve the problem. I think it might be linked to my computers Path and environment variables, but I don't know what to do.
where gnuplot
in a cmd prompt. Does it print the file path?gnuplot
itself. The library basically generates a gnuplot script and passes this to thegnuplot
executable to plot it.