Add data sets with xmgrace

thy*_*yme 4 plot xmgrace

I use xmgrace to plot data sets and I would like to add two data sets together.

So I have two files:

data1

1 1
2 4
3 9
...
Run Code Online (Sandbox Code Playgroud)

data2

1 2
2 3
3 4
...
Run Code Online (Sandbox Code Playgroud)

I start xmgrace with

xmgrace data1 data2
Run Code Online (Sandbox Code Playgroud)

Then I see both files plotted. Now I would like to generate a third graph which is just data1+data2 like

1 3
2 7
3 13
...
Run Code Online (Sandbox Code Playgroud)

I know that this is extremely simple, but for some reason I don't understand how that works.

I played with the feature Data->Transformations->Evaluate expression... but I don't know what to select as "Source" and as "Destination".

PS: I know many other ways to reach my goal but I also want to be able to do it with xmgrace.

h k*_*h k 5

这可以使用该功能轻松实现 Evaluate expression...

xmgrace data1 data2
Run Code Online (Sandbox Code Playgroud)

点击Data-> Transformations->Evaluate expression...

选择G0.S0两个集合(G0.S0G0.S1)中的任何一个(比如)作为源。如果您希望输出到新集,请不要选择任何现有集作为目标。公式应为

y=g0.s0.y+g0.s1.y
Run Code Online (Sandbox Code Playgroud)

evaluateExpression窗口看起来应该像

选择

当您 时ApplyG0.S3将创建一个新集合 ( )。您还可以修改公式(g1用于图形G1等)以在不同图形之间添加值。