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
 Origin Forum
 Video from line graph
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Eggord

Germany
13 Posts

Posted - 09/23/2014 :  10:10:15 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 9.0.0 SR2
Operating System: Win 7

Hi i will make a video/animation from a line graph. so that every 0.1 second it grow for about 100 points(x-axis is time; 100 datapoints mean 0.1 seconds)

Does somebody know how to do this? i tried Labtalk addapted from:
http://www.originlab.com/forum/topic.asp?TOPIC_ID=7368
http://wiki.originlab.com/~originla/ltwiki/index.php?title=Script:Exporting_Videos

But it doesn't even make the first line: win -a Data1
Data1 is the worksheet-name with the data. right?

Thanks!

greg

USA
1378 Posts

Posted - 09/23/2014 :  10:53:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Here is an example
plotxy (1,2) plot:=200; // Plots column 2 vs column 1 as Line plot
get %C -e last; // Finds last row of data
dlgSave ext:=*.avi title:="Name of video file"; // Get video name
int codec = vw.FourCC(0, 0, 0, 0); // uncompressed
int err = vw.Create(%(fname$), codec, 15, 1024, 768);
if( 0 == err )
{
// This advances the end of the plot by 100 rows
for( idx = 0 ; idx <= last ; idx += 100 )
{
set %C -e idx;
// Delay so we can watch.
sec -pw %h;
// Write graph to video as a single frame.
err = vw.WriteGraph();
if( err )
break;
}

// Release the video writer.
vw.Release();

if( err )
type "WriteGraph error $(err)";
}
else
type "VideoWriter Create error $(err).";
Go to Top of Page

Eggord

Germany
13 Posts

Posted - 09/23/2014 :  12:48:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
thank you! This worked.

Is there a way to manage the layout(axis,plot details, scale and so) of the plot?
Or a link/pdf with commands for that?
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