| T O P I C R E V I E W |
| quickkk |
Posted - 12/17/2004 : 7:50:26 PM 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! |
| 1 L A T E S T R E P L I E S (Newest First) |
| greg |
Posted - 12/29/2004 : 3:11:59 PM 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.
|
|
|