使用框在同一文件上绘制不同的列 [英] Plotting different columns on the same file using boxes

查看:67
本文介绍了使用框在同一文件上绘制不同的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个看起来像

$cat myfile.dat

1 8 32 19230 1.186 3.985
1 8 64 9620 0.600 7.877
1 8 128 4810 0.312 15.136
1 8 256 2410 0.226 20.927
1 8 512 1210 0.172 27.708
1 8 1024 610 0.135 35.582
1 8 2048 310 0.121 40.172
1 8 4096 160 0.117 43.141
1 8 8192 80 0.112 44.770
.....
2 8 16384 300 0.692 6.816
2 8 32768 150 0.686 6.877
2 8 65536 80 0.853 5.904
2 10 320 7830 1.041 4.575
2 10 640 3920 0.919 5.189
2 10 1280 1960 0.828 5.757
2 10 2560 980 0.773 6.167
2 10 5120 490 0.746 6.391
2 10 10240 250 0.748 6.507
2 10 20480 130 0.770 6.567
....
3 18 8192 10 1.311 12.759
3 20 32 650 1.631 3.978
3 20 64 330 0.838 7.863
3 20 128 170 0.483 14.046
3 20 256 90 0.508 14.160
3 20 512 50 0.559 14.283
3 20 1024 30 0.665 14.405
3 20 2048 20 0.865 14.782
3 20 4096 10 0.856 14.932
3 20 8192 10 1.704 14.998

如您所见,根据我们要作为x轴的列,有很多绘制此信息的方法.我想绘制信息的一种方法是将第6列与第1列相对应

As you can see, there are many ways of plotting this information depending on the column we want as x axis. One of the ways I would like to plot the information is the 6th against the 1st column

p "myfile.dat" u 1:6

我的主要问题是,是否有一种方法可以将这些条形图绘制为实心框,因为我们仅对获得的峰值感兴趣,而对点的频率或密度区域不感兴趣.

My main questions is if there is a way to plot those bars as solid boxes since we are only interested in the peak value achieved and not the frequency or density region of the dots.

推荐答案

您可以搜索最大值并仅绘制最大值,但这可能更容易,即使它会在另一个框上绘制很多框:

You can search for the maximum and plot only that, but this is probably easier, even if it draws lots of boxes one over another:

plot "myfile.dat" using 1:6:(.1) with boxes fillstyle solid

这篇关于使用框在同一文件上绘制不同的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆