简体   繁体   中英

Trying Haskells plotList command, and nothing is being shown

So basically i fire up the gchi import the graphics library and then go and do this.

Prelude Graphics.Gnuplot.Simple> plotList [] [(1, 1), (2, 2), (3, 3)]
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package mtl-2.1.2 ... linking ... done.
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package filepath-1.3.0.1 ... linking ... done.
Loading package old-locale-1.0.0.5 ... linking ... done.
Loading package time-1.4.0.1 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package unix-2.6.0.1 ... linking ... done.
Loading package directory-1.2.0.1 ... linking ... done.
Loading package process-1.1.0.2 ... linking ... done.
Loading package containers-0.5.0.0 ... linking ... done.
Loading package data-accessor-0.2.2.6 ... linking ... done.
Loading package data-accessor-transformers-0.2.1.6 ... linking ... done.
Loading package exceptions-0.6.1 ... linking ... done.
Loading package temporary-1.2.0.3 ... linking ... done.
Loading package utility-ht-0.0.10 ... linking ... done.
Loading package gnuplot-0.5.2.2 ... linking ... done.

All this stuff happens, but no image is shown? Do i have to do some sort of main function call to display or how would i go about actually seeing a picture. Thanks for the advice.

Make sure you have the gnuplot binary installed, and not only the Haskell gnuplot package from hackage . The latter doesn't really check whether you have the necessary binary installed. Depending on your platform, it simply invokes a shell command or uses a pipe and doesn't look for the return type, therefore you don't even get an error.

You can check whether you have gnuplot installed via

$ gnuplot --version

If this doesn't give you a version, you either have yet to install gnuplot, or gnuplot isn't in your path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM