简体   繁体   English

qtgrace/xmgrace 非重叠数据集

[英]qtgrace/xmgrace non-overlaping data sets

I'm using qtgrace for MacOS and when I plotted two data in qtgrace I got something like this:我正在为 MacOS 使用 qtgrace,当我在 qtgrace 中绘制两个数据时,我得到了这样的结果:

Overlapping data sets重叠数据集

However, I would like to plot something like this:但是,我想 plot 是这样的:

Non-overlapping data sets非重叠数据集

My data 1:我的数据1:

    0       14
 0.1        6
 0.2       14
 0.3       14
 0.4       14
 0.5       14
 0.6       14
 0.7       14
 0.8        6
 0.9        6
   1        6
 1.1        6
 1.2        6
 1.3        6
 1.4        6
 1.5        6
 1.6        6
 1.7        6
 1.8        6
 1.9        6
   2        6
 2.1        6
 2.2        6
 2.3        6
 2.4        6
 2.5        6
 2.6        6
 2.7        6
 2.8        6
 2.9        6
   3        6
 3.1        6
 3.2        6
 3.3        6
 3.4        6
 3.5        6
 3.6        6
 3.7        6
 3.8        6
 3.9        6
   4        6
 4.1        6
 4.2        6
 4.3        6
 4.4        6
 4.5        6
 4.6        6
 4.7        6
 4.8        6
 4.9        6
   5        6
 5.1        6
 5.2        6
 5.3        6
 5.4        6
 5.5        6
 5.6        6
 5.7        6
 5.8        6
 5.9        6
   6        6
 6.1        6
 6.2        6
 6.3        6
 6.4        6
 6.5        6
 6.6        6
 6.7        6
 6.8        6
 6.9        6
   7        6
 7.1        6
 7.2        6
 7.3        2
 7.4        6
 7.5        2
 7.6        2
 7.7        2
 7.8        2
 7.9        6
   8        2
 8.1        6
 8.2        2
 8.3        2
 8.4        6
 8.5        6
 8.6        6
 8.7        2
 8.8        6
 8.9       19
   9       19
 9.1        6
 9.2        6
 9.3        6
 9.4        2
 9.5        2
 9.6        2
 9.7        2
 9.8        2
 9.9        2
  10        2
10.1        2
10.2        2
10.3        2
10.4        2
10.5        2
10.6        2
10.7        2
10.8        2
10.9        2
  11        2
11.1        2
11.2        2
11.3        2
11.4        2
11.5        2
11.6        2
11.7        2
11.8        2
11.9        2
  12        2
12.1        2
12.2        2
12.3        2
12.4        2
12.5        2
12.6        2
12.7        2
12.8        2
12.9        2
  13        2
13.1        2
13.2        2
13.3        2
13.4        2
13.5        2
13.6        2
13.7        2
13.8        2
13.9        2
  14        2
14.1        2
14.2        2
14.3        2
14.4        2
14.5        2
14.6        2
14.7        2
14.8        2
14.9        2
  15        2
15.1        2
15.2        2
15.3        2
15.4        2
15.5        2
15.6        2
15.7        2
15.8        2
15.9        2
  16        2
16.1        2
16.2        2
16.3        2
16.4        2
16.5        2
16.6        2
16.7        2
16.8        2
16.9        2
  17        2
17.1        2
17.2        2
17.3        2
17.4        2
17.5        2
17.6        2
17.7        2
17.8        2
17.9        2
  18        2
18.1        2
18.2        2
18.3        2
18.4        2
18.5        2
18.6        2
18.7        2
18.8        2
18.9        2
  19        2
19.1        2
19.2        2
19.3        2
19.4        2
19.5        2
19.6        2
19.7        2
19.8        2
19.9        2
  20        2
20.1        2
20.2        2
20.3        2
20.4        2
20.5        2
20.6        2
20.7        2
20.8        2
20.9        2
  21        2
21.1        2
21.2        2
21.3        2
21.4        2
21.5        2
21.6        2
21.7        2
21.8        7
21.9        2
  22        2
22.1        2
22.2        2
22.3        7
22.4        7
22.5        7
22.6        7
22.7        7
22.8        2
22.9        2
  23        7
23.1        7
23.2        7
23.3        7
23.4        7
23.5        2
23.6        2
23.7        2
23.8        2
23.9        2
  24        2
24.1        2
24.2        2
24.3        2
24.4        2
24.5        2
24.6        2
24.7        2
24.8        2
24.9        2
  25        2   
  .         .
  .         .
  .         .

Data 2:数据2:

   0        4
 0.1        4
 0.2        4
 0.3        4
 0.4        4
 0.5        4
 0.6        4
 0.7        4
 0.8        4
 0.9        4
   1        2
 1.1        4
 1.2        4
 1.3        4
 1.4        4
 1.5        4
 1.6        4
 1.7        4
 1.8        4
 1.9        4
   2        4
 2.1        4
 2.2        4
 2.3        4
 2.4        4
 2.5        4
 2.6        4
 2.7        4
 2.8        4
 2.9        4
   3        4
 3.1        4
 3.2        4
 3.3        4
 3.4        4
 3.5        4
 3.6        4
 3.7        4
 3.8        4
 3.9        4
   4        4
 4.1        4
 4.2        4
 4.3        4
 4.4        4
 4.5        4
 4.6        4
 4.7        4
 4.8        4
 4.9        4
   5        4
 5.1        4
 5.2        4
 5.3        4
 5.4        4
 5.5        4
 5.6        4
 5.7        4
 5.8        4
 5.9        4
   6        4
 6.1        4
 6.2        4
 6.3        4
 6.4        4
 6.5        4
 6.6        4
 6.7        4
 6.8        4
 6.9        4
   7        4
 7.1        4
 7.2        4
 7.3        4
 7.4        4
 7.5        4
 7.6        4
 7.7        4
 7.8        4
 7.9        4
   8        4
 8.1        4
 8.2        4
 8.3        4
 8.4        2
 8.5        4
 8.6        4
 8.7        4
 8.8        4
 8.9        4
   9        4
 9.1        4
 9.2        4
 9.3        4
 9.4        4
 9.5        4
 9.6        4
 9.7        4
 9.8        4
 9.9        4
  10        4
10.1        4
10.2        4
10.3        4
10.4        4
10.5        2
10.6        2
10.7        4
10.8        2
10.9        2
  11        2
11.1        2
11.2        4
11.3        4
11.4        2
11.5        2
11.6        2
11.7        2
11.8        2
11.9        2
  12        2
12.1        2
12.2        2
12.3        2
12.4        4
12.5        4
12.6        2
12.7        2
12.8        4
12.9        2
  13        2
13.1        4
13.2        4
13.3        4
13.4        4
13.5       10
13.6        2
13.7        2
13.8        2
13.9        2
  14        2
14.1        2
14.2        2
14.3       10
14.4        2
14.5        2
14.6        4
14.7        2
14.8        2
14.9        4
  15        2
15.1       10
15.2        2
15.3        2
15.4        2
15.5        2
15.6        2
15.7        2
15.8        2
15.9        2
  16        2
16.1        2
16.2        2
16.3        2
16.4        2
16.5        2
16.6        2
16.7        2
16.8        2
16.9        2
  17        2
17.1        2
17.2        2
17.3        2
17.4        2
17.5        2
17.6        2
17.7        2
17.8        2
17.9        2
  18        2
18.1        2
18.2        2
18.3        2
18.4        2
18.5        2
18.6        2
18.7        2
18.8        2
18.9        2
  19        2
19.1        2
19.2        2
19.3        2
19.4        2
19.5        2
19.6        2
19.7        2
19.8        2
19.9        2
  20        2
20.1        2
20.2        2
20.3        2
20.4        2
20.5        2
20.6        2
20.7        2
20.8        2
20.9        2
  21        2
21.1        2
21.2        2
21.3        2
21.4        2
21.5        2
21.6        2
21.7        2
21.8        2
21.9        2
  22        2
22.1        2
22.2        2
22.3        2
22.4        2
22.5        2
22.6        2
22.7        2
22.8        2
22.9        2
  23        2
23.1        2
23.2        2
23.3        2
23.4        2
23.5        2
23.6        2
23.7        2
23.8        2
23.9        2
  24        2
24.1        2
24.2        2
24.3        2
24.4        2
24.5        2
24.6        2
24.7        2
24.8        2
24.9        2
  25        2
  .         .
  .         .
  .         .

The data are in two separate xvg file from GROMACS cluster analysis.数据位于来自 GROMACS 聚类分析的两个单独的 xvg 文件中。 I wanna plot five different sets in a manner which I can see all data without superposing.我想要 plot 五个不同的集合,我可以在不叠加的情况下查看所有数据。

Thank you!谢谢!

I think the best approach would be to write a script that takes the original files and spits out new files with shifted y values.我认为最好的方法是编写一个脚本,该脚本采用原始文件并吐出具有偏移 y 值的新文件。 However, since you have asked for a qt/xmgrace solution, here is how you do it:但是,由于您要求使用 qt/xmgrace 解决方案,因此您可以这样做:

  • Load up all the datasets into qtgrace将所有数据集加载到 qtgrace
  • Open the "Data -> Transformations -> Evaluate expression..." dialog打开“数据 -> 转换 -> 评估表达式...”对话框
  • Select in the left and right columns a dataset and in the textbox below enter the formula y = y + 0.1 . Select 在数据集的左右列中,并在下面的文本框中输入公式y = y + 0.1 Click "apply".点击“应用”。 This will shift the dataset up by 0.1这会将数据集上移 0.1
  • Select the next dataset in the same way and use the formula y = y + 0.2 . Select 以同样的方式下一个数据集并使用公式y = y + 0.2 Click apply点击申请
  • Rinse and repeat for all the datasets (changing the shift accordingly)冲洗并重复所有数据集(相应地改变班次)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM