绘制耦合数据

时间:2012-10-15 08:08:55

标签: gnuplot

我无法理解如何在不编写输入文件的情况下在Gnuplot中绘制耦合数据。

假设我有这种格式的数据:

(x_val, y_val)

我想做点什么:

x <- [x_val_1, x_val_2, ... x_val_n]
y <- [y_val_1, y_val_2, ... y_val_n]
plot x y

有可能吗?我怎么能这样做?

1 个答案:

答案 0 :(得分:1)

如果我理解正确,你可以使用gnuplot的"-"伪数据文件:

#for documentation, refer to 
# `help plot datafile special-filenames` 
#  at the gnuplot prompt
plot '-' w points
  1 2
  3 4
  5 6
  7 8
  9 10
  11 12
  e

如果您尝试使用gnuplot来计算积分,那么这将无效。根据计算点的方式,您可以将其绘制在参数曲线上。