Simulation-Plot
Posted: Thu Jul 09, 2015 7:00 am
Dear all,
I am trying to run a simulation, so i would like to generate a sequence of plots in one frame. However, the following code doesn't work, since every plot is created in a new frame.
Is there any chance to get the problem fixed?
Here the code:
Thank you very much in advance.
Zermelo_I
I am trying to run a simulation, so i would like to generate a sequence of plots in one frame. However, the following code doesn't work, since every plot is created in a new frame.
Is there any chance to get the problem fixed?
Here the code:
Code: Select all
wfcreate test a 1960 2000
scalar r2 = 0
!i=0
while r2 < 0.8
!i=!i+1
series u1 = nrnd
series u2 = nrnd
series y1
series y2
y1(1) = 0
y2(1) = 0
smpl 1961 @last
y1 = y1(-1) + u1
y2 = y2(-1) + u2
smpl @all
equation eq.ls y1 c y2
scalar r2 = eq.@r2
graph graph!i y1 y2
graph!i.setupdate(auto)
show graph!i
delete graph!i
wend
graph gr1 y1 y2
show gr1
group g1 y1 y2
g1.scat linefit
Zermelo_I