The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Animated Plots and real time
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

irek

Japan
14 Posts

Posted - 01/10/2003 :  11:32:09 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
New qustion. :( Could someone explain what does it mean "animate mode" of plots? I am trying to plot data in real time and use as example the IsingModel.C from Samples. But my program doesn't plot
data in real time.
I update the plot from my program with next method:

Dataset::Update
Prototype: PUBLIC void Update(BOOL bFromOrigin, int mode = -1)
...
REDRAW_REALTIME_SCOPE this is used to do realtime drawing for the entire range of data. To see effect in plots, must set dataplots to animate mode

So, what does it mean animated mode? How to plot data in real time?
Thank you in advance!

cpyang

USA
1406 Posts

Posted - 01/10/2003 :  11:42:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
From labtalk to set a data plot in animation mode by

set %C -an 1;

This will put the active dataset in the active layer in animation mode.

CP


Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 01/10/2003 :  11:58:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi CP,

I think irek is asking what animation mode means. What does it do? I have never been sure about that myself. Origin and LabTalk help have always been sketchy on the subject.

Mike Buess
Origin WebRing Member
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 01/10/2003 :  7:10:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Origin uses the animate mode internally for operations like moving of data points. When you turn a data plot into animate mode, the trace will be drawn in reverse video, such that drawing over the same trace will erase it. The drawback is when you have many data points, portion of the trace can erase another portion, resulting in a not so complete curve. Currently there is no Origin C access to enable/disable animate mode, so labtalk Set -an must be used.

I have created a DialogBuilder example to show how to make a realtime graph in a dialog, and portion of the code looks like this,



static BOOL OnStartScope(Control cButton)
{
GraphControl og1 = MyDlg.GetItem( IDC_REALTIME_GRAPH );
GraphPage gp = og1.GetPage(); // Get the graph in the control
gp.LT_execute("set %C -an 1"); // make sure data plot is in animate mode

GraphLayer gl = gp.Layers(); // Get active layer
DataPlot dp = gl.DataPlots(0);
Dataset bb(dp.GetDatasetName());
if(!bb)
{
ASSERT(FALSE);
return TRUE;
}
for(int jj = 0; jj < 10; jj++)
{
make_peak(jj/9.0, bb); // some function to change data

bb.Update(FALSE, REDRAW_REALTIME_SCOPE);
}
return TRUE;
}




This example will be included in the next service release.

CP


Edited by - cpyang on 01/10/2003 7:11:59 PM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000