简体   繁体   English

尝试Haskells plotList命令,什么也没有显示

[英]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. 因此,基本上我启动了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.

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 . 确保您安装了gnuplot二进制文件,不仅安装了hackage的Haskell gnuplot 软件包 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. 根据您的平台,它只是调用shell命令或使用管道,并且不查找返回类型,因此您甚至都不会收到错误。

You can check whether you have gnuplot installed via 您可以通过以下方法检查是否已安装gnuplot

$ gnuplot --version

If this doesn't give you a version, you either have yet to install gnuplot, or gnuplot isn't in your path. 如果这没有给您提供版本,则您可能尚未安装gnuplot,或者gnuplot不在您的路径中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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