首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GNUPlot:终端集未知

GNUPlot:终端集未知
EN

Ask Ubuntu用户
提问于 2015-12-18 07:29:33
回答 3查看 28.5K关注 0票数 2
代码语言:javascript
复制
    G N U P L O T
    Version 4.6 patchlevel 4    last modified 2013-10-02 
    Build System: Linux x86_64

    Copyright (C) 1986-1993, 1998, 2004, 2007-2013
    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 'unknown'
    gnuplot>

嗨,gnuplot显示我的终端类型设置为“未知”。

如果我输入以下命令。

代码语言:javascript
复制
gnuplot> plot "./MergePlot.dat" with linespoint

什么都没发生。

EN

回答 3

Ask Ubuntu用户

发布于 2016-06-03 08:50:21

设置正确的终端

您发现的错误意味着gnuplot无法识别有效的终端。你必须设置一个有效的。要知道可用的列表,可以从gnuplot的命令行询问。

代码语言:javascript
复制
gnuplot> set terminal 

它的回答是这样的

代码语言:javascript
复制
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

              ...  Many linees  ...

              gif  GIF images using libgd and TrueType fonts
             gpic  GPIC -- Produce graphs in groff using the 

              ...  Other linees  ...

对于它们中的每一个,您都可以要求它自己绘制更多信息,例如使用help terminal gif

然后你可以简单地设置终端,如果你尝试了愚蠢的一个,它是可爱的。

代码语言:javascript
复制
gnuplot> set terminal dumb
gnuplot> plot 0.5*sin(x/2)  lt 0, cos(x/2)



    1 ++---------------+---------------####---------------+---------------++
      +                +             ##  + ##          0.5*sin(x/2) +....+ +
  0.8 ++                            #        #             cos(x/2) ######++
      |                            #          #                            |
  0.6 ++                          #            #                          ++
      |++++++                    #              #+++++++                   |
  0.4 ++    +++                 #             ++ #     +++                ++
      #       +++               #           ++   #        ++               #
  0.2 +#        ++            ##          ++      ##        +             #+
    0 +#          ++          #          ++        #         ++           #+
      | #          ++        #         ++           #         ++         # |
 -0.2 ++ #           +      #         ++             #          ++      # ++
      |  ##           ++    #       ++               #           +++   ##  |
 -0.4 ++   #            +++#      ++                  #            +++#   ++
      |     #             #+++++++                     #             #+++++|
 -0.6 ++    #             #                            #             #    ++
      |      ##         ##                              ##         ##      |
 -0.8 ++      #        #                                  #        #      ++
      +        ##    ###                 +                ###    ##        +
   -1 ++---------#####-+-----------------+----------------+-#####---------++
     -10              -5                 0                5                10

如果您无法使用“您可以看到”的终端(wxtqtx11aqua.),请使用图形格式并将输出保存在外部文件中。通过这种方式,您将在运行gnuplot的目录中创建一个文件。

代码语言:javascript
复制
set terminal png enhanced truecolor    # ... whatever ...
  set output 'tempfile.png'            # you need to redirect to a file the output 
    plot 0.5*sin(x/2)  lt 0, cos(x/2)  # your plot commands     
    # replot # it should be cosy if you are not doing multiplot 
  set out                              # restore the output redirection
set terminal GNUTERM                   # restore the default terminal

注意:

您可能需要安装不同的包-qt,-nox,-x11以具有不同的特性( OP刚刚完成了),或者自己编译以添加其他特性。

票数 3
EN

Ask Ubuntu用户

发布于 2015-12-29 20:13:13

您肯定知道如何使用gnuplot。

你没有告诉侏儒它要策划什么。

以及输出应该是什么样子。

请阅读手册。否则,没有人会帮助你,如果你不看手册。http://people.duke.edu/~hpgavin/gnuplot.html

否则,下面是一个示例,说明一个工作图是如何作为命令的。

代码语言:javascript
复制
#SET TERMINAL
set term svg
set output 'temp-verlauf.svg'
set title "Temperaturverlauf"

#Axes label
set xlabel "Messzeitpunkt"
set ylabel "Luftfeuchte/Temperatur"
set y2label "Luftdruck"

#Axis setup
set xdata time # x-Achse wird im Datums/Zeitformat skaliert
set timefmt "%d.%m.%Y\t%H:%M:%S" # Format Zeitangaben yyyy.mm.dd_hh:mm:ss
set format x "%H:%M" # Format für die Achsenbeschriftung


#Axis ranges
set yrange [0:60] # die y-Achse geht von:bis

#Tics
set ytics nomirror
set y2tics nomirror

#OTHER
set datafile separator "\t"
set xrange ["06.11.2014 14:00:00":"07.11.2014   21:00:00"]

plot \
"file.dat" every 10 using 1:5 title "Luftfeuchte" with lines, \
"file.dat" every 10 using 1:6 title "Temperatur" with lines, \
"file.dat" every 10 using 1:7 title "Luftdruck" with lines axes x1y2, \
"file.dat" every 10 using 1:17 title "Niederschlagsintensitaet Synop (4677)" with lines
票数 2
EN

Ask Ubuntu用户

发布于 2022-07-19 06:57:38

我想您的系统中没有存储库和最新包,这就是问题出现的原因。因此,在终端中运行此命令,

代码语言:javascript
复制
sudo apt-get install gnuplot-x11

or

sudo apt-get install gnuplot-qt

这应该可以解决你的问题。(参见在这里输入链接描述)

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/710783

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档