gnuplot png未知和pdf错误

gnuplot png未知和pdf错误,gnuplot,ubuntu-10.04,Gnuplot,Ubuntu 10.04,我有一个shell脚本,可以执行一些计算并绘制结果。我已经使用gnuplot绘制了结果。我面临两个问题。我以前在我的cygwin上运行脚本,没关系。当我试图在Ubuntu(10.04-wubi-Version)上运行它时,它无法识别png文件(设置终端png未知)。我已尝试安装(缺少支持“libgd2_2.0.36~rc1~dfsg”的库)并更新库…运气不好!!然后我决定使用set terminal pdf,因为我发现它受支持: 这是我的gnuplot版本: G N U P L O T Vers

我有一个shell脚本,可以执行一些计算并绘制结果。我已经使用gnuplot绘制了结果。我面临两个问题。我以前在我的cygwin上运行脚本,没关系。当我试图在Ubuntu(10.04-wubi-Version)上运行它时,它无法识别png文件(设置终端png未知)。我已尝试安装(缺少支持“libgd2_2.0.36~rc1~dfsg”的库)并更新库…运气不好!!然后我决定使用set terminal pdf,因为我发现它受支持:

这是我的gnuplot版本:

G N U P L O T
Version 4.4 patchlevel 0
last modified March 2010
System: Linux 2.6.35-32-generic
以下是终端类型的输出:

      latex  LaTeX picture environment
      mf  Metafont plotting standard
      mif  Frame maker MIF 3.00 format
      mp  MetaPost plotting standard
      nec_cp6  NEC printer CP6, Epson LQ-800 [monocrome color draft]
      okidata  OKIDATA 320/321 Standard
      pbm  Portable bitmap [small medium large] [monochrome gray color]
      pcl5  HP Designjet 750C, HP Laserjet III/IV, etc. (many options)
      -->pdf  PDF (Portable Document File) file driver
      postscript  PostScript graphics, including EPSF embedded files (*.eps)
      pslatex  LaTeX picture environment with PostScript \specials
      pstex  plain TeX with PostScript \specials
现在,在我将shell脚本修改为使用pdf之后,出现了这个错误(注意:一些pdf文件已经创建)

我再次在所有行中添加了“;”,错误仍然出现

下面是我的shell脚本的一部分(给出错误):

shell脚本的其余部分产生相同的错误(注意:已创建输出)

经过长时间的搜索,我认为问题与UBUNTU和Gnuplot的版本有关……我不想升级我的UBUNTU版本


解决错误后。关于如何在ubuntu 10.04上使用“set terminal png”的任何建议???

为了解决这个问题,我在
9,\
之后添加了
ls
和双空格

最后的答案是:

gnuplot << TOEND ;
set terminal pdf;
set output 'A.pdf';
set autoscale ;                        
#unset log                              
#unset label                            
set xtic auto ;                         
set ytic auto  ;                        
set title "title";
set xlabel "x axis";
set ylabel "y axis";
######################################
#UPDATE: I have added double space to a void the error 
# and @psibar pointed that 'ls' was missing
######################################
plot "A1.tr" using 1:2 title "A" with lines ls 9,  \  
"A2.tr" using 1:2 title "B" with lines 11       

gnuplot在
plot
命令的末尾,数字9和11在那里做什么?我认为缺少了一些东西。应该是
…行ls 9
?9是线条样式…你是对的,我缺少了“ls”…但仍然得到:第0行:无效字符\-->指向9后面,\0行:无效字符\-->的字符mmand-->指向A2.trI解决了问题。我在“,\”后面加了两倍空格以克服错误。请检查更新……是的,这是一个非常恼人的错误,也让我头疼。@SimpleEasy:您可以回答自己的问题,为其他用户提供信息。
  gnuplot << TOEND ;
  set terminal pdf;
  set output 'A.pdf';
  set autoscale ;                        
  #unset log                              
  #unset label                            
  set xtic auto ;                         
  set ytic auto  ;                        
  set title "title";
  set xlabel "x axis";
  set ylabel "y axis";
   ######################################
   #UPDATE: I have added double space to a void the error  
   ######################################
   plot "A1.tr" using 1:2 title "A" with lines 9,  \  
    "A2.tr" using 1:2 title "B" with lines 11       
line 0: invalid character \ --->pointing to 9, \
line 0: invalid command --->poiting to A2.tr
......
......
######################################
#UPDATE:  @psibar pointed that 'ls' missing    
######################################
plot "results.tr" using 1:2 title "Results" with lines ls 9;
                                                                           ^
line 0: ';' expected---> pointing to 9 ;
gnuplot << TOEND ;
set terminal pdf;
set output 'A.pdf';
set autoscale ;                        
#unset log                              
#unset label                            
set xtic auto ;                         
set ytic auto  ;                        
set title "title";
set xlabel "x axis";
set ylabel "y axis";
######################################
#UPDATE: I have added double space to a void the error 
# and @psibar pointed that 'ls' was missing
######################################
plot "A1.tr" using 1:2 title "A" with lines ls 9,  \  
"A2.tr" using 1:2 title "B" with lines 11