Gnuplot轴范围格式

时间:2013-06-28 14:15:13

标签: range gnuplot axis

我正在尝试从CSV文件中绘制数据,而我的xrange不是线性的 - 它从0.5上升到1.2,然后随着数据集的进展下降到0.1。 Gnuplot将数据从0.1提升到1.2递增,我需要告诉它只是在读取数据时获取数据。我怎么做?数据是针对变化的水流速的温度图......

谢谢!

以下是我要绘制的数据示例,抱歉很长:

0.558 34.327

0.698 34.429

1.264 34.577

1.258 34.690

1.252 34.864

1.274 35.010

1.271 35.097

1.286 38.223

1.306 38.186

1.291 38.114

1.288 38.100

1.294 38.049

1.288 38.005

1.297 37.467

1.297 37.464

1.299 37.437

1.298 37.399

1.281 37.406

0.606 37.456

0.607 37.449

0.601 37.483

0.594 37.495

0.594 37.587

0.607 37.625

0.607 37.737

0.596 37.798

0.599 37.918

0.334 38.015

0.348 38.073

0.355 38.171

0.345 38.259

0.348 38.386

0.142 39.230

0.137 39.305

0.126 39.374

0.115 39.371

0.131 39.423

0.132 39.369

此外,x和y变量将继续增加和减少。我只需要显示从文件中读取的X轴。我附上了我想要替换的excel生成图的图像,以及用于比较的gnuplot版本(只有一个图线)。

Excel Plot

Gnu Plot

"Fixed" Gnuplot

1 个答案:

答案 0 :(得分:0)

尝试

set xtics rotate by -90
plot "-" using 0:2:xtic(1) with lines
0.558 34.327
0.698 34.429
1.264 34.577
1.258 34.690
1.252 34.864
1.274 35.010
1.271 35.097
1.286 38.223
1.306 38.186
1.291 38.114
1.288 38.100
1.294 38.049
1.288 38.005
1.297 37.467
1.297 37.464
1.299 37.437
1.298 37.399
1.281 37.406
0.606 37.456
0.607 37.449
0.601 37.483
0.594 37.495
0.594 37.587
0.607 37.625
0.607 37.737
0.596 37.798
0.599 37.918
0.334 38.015
0.348 38.073
0.355 38.171
0.345 38.259
0.348 38.386
0.142 39.230
0.137 39.305
0.126 39.374
0.115 39.371
0.131 39.423
0.132 39.369
EOF

enter image description here