我该如何设置这个包?

时间:2014-06-04 20:52:58

标签: haskell package system

这可能是一个错误,但我想我只需要设置我的环境。我在Ubuntu上。我尝试了包easyplot。当我将绘图保存到文件而不是终端时,它工作。我需要修理什么?

λ <Prelude Graphics.EasyPlot>: plot X11 sin

set term x11 persist; plot "plot1.dat" with lines
         ^
line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list

False
λ <Prelude Graphics.EasyPlot>: plot (PNG "test.png") sin
True

然后test.png在第二个命令之后是一个很好的图片,但第一个命令什么都不做。

2 个答案:

答案 0 :(得分:1)

你可以跑:

$ sudo apt-get install gnuplot-x11

在您的终端。

或者你可以在你的浏览器中找到“apt:gnuplot-x11”而不用引号自动修复你的问题(堆栈交换不让我把它变成蓝色。)

答案 1 :(得分:0)

Ubuntu&amp;的使用版本gnuplot本身会有所帮助。也尝试遵循gnuplot给出的建议。例如,在我的Arch Linux系统上,这个&#34;设置术语&#34;产生这种反应:

$ gnuplot

    G N U P L O T
    Version 4.6 patchlevel 5    last modified February 2014
    Build System: Linux x86_64

    Copyright (C) 1986-1993, 1998, 2004, 2007-2014
    Thomas Williams, Colin Kelley and many others

    gnuplot home:     http://www.gnuplot.info
    faq, bugs, etc:   type "help FAQ"
    immediate help:   type "help"  (plot window: hit 'h')

Terminal type set to 'qt'
gnuplot> set terminal

Available terminal types:
       cairolatex  LaTeX picture environment using graphicx package and Cairo backend
           canvas  HTML Canvas object
              cgm  Computer Graphics Metafile
          context  ConTeXt with MetaFun (for PDF documents)
            corel  EPS format for CorelDRAW
             dumb  ascii art for anything that prints text
              dxf  dxf-file for AutoCad (default size 120x80)
            eepic  EEPIC -- extended LaTeX picture environment
              emf  Enhanced Metafile format
            emtex  LaTeX picture environment with emTeX specials
         epscairo  eps terminal based on cairo
         epslatex  LaTeX picture environment using graphicx package
              fig  FIG graphics language for XFIG graphics editor
              gif  GIF images using libgd and TrueType fonts
             gpic  GPIC -- Produce graphs in groff using the gpic preprocessor
          hp2623A  HP2623A and maybe others
           hp2648  HP2648 and HP2647
             hpgl  HP7475 and relatives [number of pens] [eject]
           imagen  Imagen laser printer
             jpeg  JPEG images using libgd and TrueType fonts
            latex  LaTeX picture environment
              lua  Lua generic terminal driver
               mf  Metafont plotting standard
              mif  Frame maker MIF 3.00 format
               mp  MetaPost plotting standard
             pcl5  HP Designjet 750C, HP Laserjet III/IV, etc. (many options)
         pdfcairo  pdf terminal based on cairo
              png  PNG images using libgd and TrueType fonts
         pngcairo  png terminal based on cairo
       postscript  PostScript graphics, including EPSF embedded files (*.eps)
          pslatex  LaTeX picture environment with PostScript \specials
            pstex  plain TeX with PostScript \specials
         pstricks  LaTeX picture environment with PSTricks macros
              qms  QMS/QUIC Laser printer (also Talaris 1200 and others)
               qt  Qt terminal
            regis  REGIS graphics language
              svg  W3C Scalable Vector Graphics driver
          tek40xx  Tektronix 4010 and others; most TEK emulators
          tek410x  Tektronix 4106, 4107, 4109 and 420X terminals
          texdraw  LaTeX texdraw environment
             tgif  TGIF X11 [mode] [x,y] [dashed] ["font" [fontsize]]
             tikz  TeX TikZ graphics macros via the lua script driver
         tkcanvas  Tk/Tcl canvas widget [perltk] [interactive]
             tpic  TPIC -- LaTeX picture environment with tpic \specials
          unknown  Unknown terminal type - not a plotting device
            vttek  VT-like tek40xx terminal emulator
              wxt  wxWidgets cross-platform windowed terminal
              x11  X11 Window System
             xlib  X11 Window System (gnulib_x11 dump)
            xterm  Xterm Tektronix 4014 Mode
gnuplot> 

可以看出,&#34; x11&#34;是其他可用的终端类型之一。所以难怪plot X11 sin也有效。

相关问题