How to plot a XY chart
Posted: Tue Jan 17, 2017 9:49 am
Hi,
I currently have an issue with plotting a XY chart.
I have 2 data X and Y which are functions of time: X=X(t) and Y=Y(t). I intend to plot Y versus X over N samples and update the curve periodically.
Currently the code is as follows:
with Series1 do begin
for i:= 0 to N-1 do begin
AddXY(X(t),Y(t),'');
if count>N then delete(0);
end;
end;
The code above works. But recently I have got an measuring instrument which outputs data at high rate. If I update the curve very quickly, a runtime error occurs after few minutes.
Could you advise about the reason of this runtime error ? How I could do to make a more efficient code ?
Thanks
LÊ Minh-Quang
PS: I logged for TeeChart8 account, but I have bought Teechart2016.
I currently have an issue with plotting a XY chart.
I have 2 data X and Y which are functions of time: X=X(t) and Y=Y(t). I intend to plot Y versus X over N samples and update the curve periodically.
Currently the code is as follows:
with Series1 do begin
for i:= 0 to N-1 do begin
AddXY(X(t),Y(t),'');
if count>N then delete(0);
end;
end;
The code above works. But recently I have got an measuring instrument which outputs data at high rate. If I update the curve very quickly, a runtime error occurs after few minutes.
Could you advise about the reason of this runtime error ? How I could do to make a more efficient code ?
Thanks
LÊ Minh-Quang
PS: I logged for TeeChart8 account, but I have bought Teechart2016.