我正在尝试绘制数据文件但出现此错误

我正在尝试绘制数据文件但出现此错误
~/project$ plot 'dis_xsq_out.dat' u 1:2:3

Command 'plot' not found, but can be installed with:

sudo apt install plotutils

答案1

您似乎正尝试plot直接从终端 shell 运行 Gnuplot 命令。相反,您需要从 Gnuplot 自己的交互式 shell 运行它:

$ gnuplot

    G N U P L O T
    Version 5.2 patchlevel 2    last modified 2017-11-01 

    Copyright (C) 1986-1993, 1998, 2004, 2007-2017
    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 is now 'wxt'
gnuplot> 
gnuplot> plot 'dis_xsq_out.dat' u 1:2:3

或者,你可以将其作为 shell 单行命令运行:

gnuplot -p -e 'plot "dis_xsq_out.dat" u 1:2:3'

相关内容