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
 LabTalk Forum
 Script GIF export bug?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

quickkk

Canada
23 Posts

Posted - 12/17/2004 :  7:50:26 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin):
Operating System: SUSE 9.0 (using CrossOver Office)

Hi everyone,

I'm trying to automate the process of importing a data file, plotting a linear scatter graph, and then exporting that graph as a *.gif file for later use. Seems quite simple. Here's the script that I am using to accomplish this (I'm not very good at labtalk, so it might not be the most efficient script...)

for(jj = 1; jj < 10; jj++)
{
run.section(Standard,NewWks);
open -w z:\home\amorris\work\oscillator\data\rotation\eig$(jj).dat;
work -s 0 0 0 0;
work -p 201;
layer -all ask;
win -ch 1;
doc -e W {win -ch 1};
};
count=1;
doc -e P {
Image.FileName$ = "z:\home\amorris\work\oscillator\data\rotation$(count).gif";
Image.Export.PagePixel( gif, 640, 480, 24, 0 );
count++;
}

In my script, I hide the graphs and workseets because it takes a few seconds to display each graph due to the large number of data points (there's something like a thousand columns of y data, and about 20 rows of x data).

This is the problem. It took me quite a while to figure this out: it looks like the size of the exported gif image depends on whether or not the graph was drawn on the screen. Here are two sample exported gif images (the actual format doesn't matter, I tried bmp and the same thing happened). The first one is correct, the second one isn't.


As you can see, the second image has the graph squished into one corner, whith a huge amount of useless white space.

This is what's happening: if I plot a graph and origin draws it out for me, the export will then work fine. However, if the graph is plotted in a script and then minimized, origin will never actually draw the graph out and when I export that graph I get the second type of image. I've tested this theory by omitting the hide commands in my script and creating about 10 graphs. I then checked the exported graphs and as expected, the graphs that were occluded by others (thus never being drawn by origin) were "squished" while those that were in front and actually drawn were exported correctly.

This is really annoying! My problem is that I want to import and draw 1000 graphs and then export them as gif files to make an animation. It really isn't an option to do export each individual graph seperately.

Any insights would be greatly appreciated! Thanks!

greg

USA
1380 Posts

Posted - 12/29/2004 :  3:11:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
One thing to try is setting Tools : Options : [Page] : "Margin Control" to 'Page'.
If that solves your problem, then it's likely you have a hidden object in the lower right corner of that useless white space.


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