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显示我的终端类型设置为“未知”。
如果我输入以下命令。
gnuplot> plot "./MergePlot.dat" with linespoint什么都没发生。
发布于 2016-06-03 08:50:21
您发现的错误意味着gnuplot无法识别有效的终端。你必须设置一个有效的。要知道可用的列表,可以从gnuplot的命令行询问。
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
... Many linees ...
gif GIF images using libgd and TrueType fonts
gpic GPIC -- Produce graphs in groff using the
... Other linees ...对于它们中的每一个,您都可以要求它自己绘制更多信息,例如使用help terminal gif。
然后你可以简单地设置终端,如果你尝试了愚蠢的一个,它是可爱的。
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如果您无法使用“您可以看到”的终端(wxt、qt、x11、aqua.),请使用图形格式并将输出保存在外部文件中。通过这种方式,您将在运行gnuplot的目录中创建一个文件。
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刚刚完成了),或者自己编译以添加其他特性。
发布于 2015-12-29 20:13:13
您肯定知道如何使用gnuplot。
你没有告诉侏儒它要策划什么。
以及输出应该是什么样子。
请阅读手册。否则,没有人会帮助你,如果你不看手册。http://people.duke.edu/~hpgavin/gnuplot.html
否则,下面是一个示例,说明一个工作图是如何作为命令的。
#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发布于 2022-07-19 06:57:38
我想您的系统中没有存储库和最新包,这就是问题出现的原因。因此,在终端中运行此命令,
sudo apt-get install gnuplot-x11
or
sudo apt-get install gnuplot-qt这应该可以解决你的问题。(参见在这里输入链接描述)
https://askubuntu.com/questions/710783
复制相似问题