Gnuplot图矩阵矩阵

时间:2016-11-08 15:10:06

标签: gnuplot

我有一个包含大量矩阵的文件。

y [m]
0.000000e+00    1.751220e-04    3.499253e-04    5.240956e-04    6.974406e-04
8.698938e-04    1.041423e-03    1.211997e-03    1.381576e-03    1.550104e-03
1.717548e-03    1.883899e-03    2.049140e-03    2.213239e-03    2.376164e-03
2.537870e-03    2.698285e-03    2.857244e-03    3.014375e-03    3.168647e-03

temperature [K]
2.981500e+02    2.981482e+02    2.981463e+02    2.981445e+02    2.981426e+02
2.981407e+02    2.981388e+02    2.981368e+02    2.981349e+02    2.981328e+02
2.981308e+02    2.981286e+02    2.981264e+02    2.981241e+02    2.981218e+02
2.981192e+02    2.981166e+02    2.981138e+02    2.981108e+02    2.981075e+02

我想绘制y的温度。我怎么能用gnuplot来做呢?

1 个答案:

答案 0 :(得分:0)

以下是一个可能的gnuplot“ hack”(笨拙但不太难看)。 适用于gnuplot 5.0(在提出问题时为版本)。不确定 let url = "http://127.0.0.1:5000/api/v1/counts/health-check"; fetch(url, { method: 'GET', headers: { 'Content-Type': 'application/json' } }).then(response => console.log(response.json())); Mat1字符串是否有长度限制。

数据:

Mat2

# TestMatrix1.dat
# temperature [K]
2.981500e+02    2.981482e+02    2.981463e+02    2.981445e+02    2.981426e+02
2.981407e+02    2.981388e+02    2.981368e+02    2.981349e+02    2.981328e+02
2.981308e+02    2.981286e+02    2.981264e+02    2.981241e+02    2.981218e+02
2.981192e+02    2.981166e+02    2.981138e+02    2.981108e+02    2.981075e+02

代码:

# TestMatrix2.dat
# y [m]
0.000000e+00    1.751220e-04    3.499253e-04    5.240956e-04    6.974406e-04
8.698938e-04    1.041423e-03    1.211997e-03    1.381576e-03    1.550104e-03
1.717548e-03    1.883899e-03    2.049140e-03    2.213239e-03    2.376164e-03
2.537870e-03    2.698285e-03    2.857244e-03    3.014375e-03    3.168647e-03

结果:

enter image description here

相关问题