尝试Haskells plotList命令,没有显示任何内容

时间:2014-07-28 04:24:13

标签: haskell gnuplot

所以基本上我启动gchi导入图形库然后去做这个。

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.

所有这些都发生了,但没有显示图像?我是否必须进行某种主要功能调用才能显示,或者我将如何实际看到图片。谢谢你的建议。

1 个答案:

答案 0 :(得分:1)

确保安装了gnuplot二进制文件,而不仅仅是Haskell gnuplot package from hackage。后者并没有真正检查你是否安装了必要的二进制文件。根据您的平台,它只是调用shell命令或使用管道而不查找返回类型,因此您甚至不会收到错误。

您可以通过

检查是否安装了gnuplot
$ gnuplot --version

如果这没有给你一个版本,你要么还没有安装gnuplot,要么gnuplot不在你的路径中。