replot命令使用最新的统计信息 [英] replot command uses latest stats information

查看:39
本文介绍了replot命令使用最新的统计信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个数据文件,file1.dat和file2.dat.我使用以下命令来绘制两个功能.

I have two data files, file1.dat and file2.dat. I use following commands to draw two functions.

stats 'file1.dat' u 4:7
plot 'file1.dat' u 4:($7-STATS_min_y)
stats 'file2.dat' u 4:7
replot 'file2.dat' u 4:($7-STATS_min_y)

问题是replot命令使用file2的min_y并再次应用于file1.dat.我该如何处理?非常感谢.

Problem is that the replot command uses the min_y of file2 and applies to file1.dat once again. How can I handle this? Many thanks.

推荐答案

replot 命令重复先前的 plot 命令并添加新图.如果两个命令中都使用了一个变量( STATS_min_y ),则使用相同的值.您可以使用例如stats 命令的 name 参数可将值保存在不同的变量中:

The replot command repeats the previous plot command and adds a new plot. If one variable (STATS_min_y) is used in both commands, the same value is used. You can use e.g. the name parameter for the stats command to save the values in different variables:

stats 'file1.dat' u 4:7 name 'F1_'
plot 'file1.dat' u 4:($7 - F1_min_y)
stats 'file2.dat' u 4:7 name 'F2_'
replot 'file2.dat' u 4:($7 - F2_min_y)

在这种情况下,您当然也可以使用一个 plot 命令:

In that case you could of course also use a single plot command:

stats 'file1.dat' u 4:7 name 'F1_'
stats 'file2.dat' u 4:7 name 'F2_'
plot 'file1.dat' u 4:($7 - F1_min_y), 'file2.dat' u 4:($7 - F2_min_y)

这篇关于replot命令使用最新的统计信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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