linux - Gnuplot 不加载图表

标签 linux ubuntu gnuplot

我正在使用 gnuplot 版本 4.6 补丁级别 4。

测试此链接中的示例脚本时:http://people.duke.edu/~hpgavin/gnuplot.html

我尝试使用以下命令加载:

gnuplot
gnuplot> load 'testplotdata.p'

但没有打开任何窗口。有人可以提供一些指导吗?

脚本和数据如下。

测试图数据.p

# Gnuplot script file for plotting data in file "force.dat"
# This file is called   force.p
  set   autoscale                        # scale axes automatically
  unset log                              # remove any log-scaling
  unset label                            # remove any previous labels
  set xtic auto                          # set xtics automatically
  set ytic auto                          # set ytics automatically
  set title "Force Deflection Data for a Beam and a Column"
  set xlabel "Deflection (meters)"
  set ylabel "Force (kN)"
  set key at 0.01,100
  set label "Yield Point" at 0.003,260
  set arrow from 0.0028,250 to 0.003,280
  set xr [0.0:0.022]
  set yr [0:325]
  plot    "testplotdata.dat" using 1:2 title 'Column' with linespoints , \
        "testplotdata.dat" using 1:3 title 'Beam' with points

测试图数据.dat

# Force-Deflection data for a beam and a bar
# Deflection    Col-Force       Beam-Force 
0.000              0              0
0.001            104             51
0.002            202            101
0.003            298            148
0.0031           290            149
0.004            289            201
0.0041           291            209
0.005            310            250
0.010            311            260
0.020            280            240

最佳答案

它对我有用。我的 Ubuntu 12.04 上的 gnuplot 也是版本 4.6 patchlevel 4。检查您是否有终端类型 wxt。您可以通过在 gnuplot 中发出命令 setterminal 来检查输出是否包含 wxt。如果没有,请安装 gnuplot-x11 软件包(对于 Debian 和 Ubuntu,其他 Linux 发行版的软件包名称可能有所不同。)

关于linux - Gnuplot 不加载图表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27140147/

相关文章:

linux - 使用 SFTP 使用 PERL/CGI.pm 将图像从 HTML 形式传输到远程 Linux 服务器

regex - 使用 bash 和正则表达式获取字符串中的数字

node.js - 如何部署和安装 Node.js 和 MongoDB 应用程序?

oracle - 连接 Oracle 与 unixODBC : TNS:net service name is incorrectly specified

plot - gnuplot——如何使用即时绘图列的第一个值?

.net - 有什么方法可以让应用平台的中间代码独立?

java - 执行 linux sh 文件时出现 ArrayIndexOutOfBounds 异常

time - Gnuplot 使用部分日期列/除以天数

linux - 使用 sed 在特定行之后追加 HTML 代码块

gnuplot - 在 gnuplot 中绘制一些分段函数