【问题标题】:Don't enter gnuplot terminal不要进入 gnuplot 终端
【发布时间】:2013-05-28 23:19:17
【问题描述】:

使用gnuplot 模块,在绘制图表后,我会被放入gnuplot 控制台。有没有办法阻止这种情况发生?我从不使用它,而且在关闭每个图表后必须输入exit 很烦人,尤其是在我测试一系列图表时。

例如:

module Main where
import Graphics.Gnuplot.Simple
main = do
    let xs = linearScale 100 (-10, 10) :: [Float]
    plotFunc [] xs sin
    plotFunc [] xs cos

我使用的是 Windows 7 x64 和 Haskell 平台 2013.2.0.0,如果这会有所不同的话。

【问题讨论】:

  • 您能发布一个您正在运行的代码的最小示例吗?
  • @andyras 添加到问题中。
  • 还可以看看easyplot包:hackage.haskell.org/package/easyplot,它是gnuplot的另一个接口
  • @scravy 谢谢,我会看看这是否符合我的需要。
  • @scravy 也许这是一个 Windows 问题 - 使用 easyplot,调用 plot Windows sin 创建一个立即关闭的绘图窗口。调用 plot' [Interactive] Windows sin 会像以前一样打开 gnuplot 控制台。当我可以访问安装了平台的 Mac 时,我会在 Mac 上试一试。

标签: haskell gnuplot


【解决方案1】:

尝试以下方法:

bind Close "exit gnuplot"

它应该可以解决问题!

如果您不熟悉,请参阅此处了解绑定详情:bind reference

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-06-08
    • 2012-07-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-14
    • 2017-05-30
    • 2015-07-05
    相关资源
    最近更新 更多