graphics speed from 4.1.2 to 5.0.2 and virtual graphical window
bagvian
bagvian at gmail.com
Wed Oct 1 17:08:40 CEST 2008
Hi there,
My problem is the following: I want to generate many plots and export
them as, say gif file to see them later.
I wrote an example that does such a task:
for i=0:9
// Create a graphival window
scf(i);
f=gcf()
f.figure_size= [1600,1200];
// Plot a first random function with using a couple of graphical options
subplot(2,1,1); plot(rand(1,100),'b-x');
a=gca();
a.tight_limits="on";
legends(["rand0"],[2],opt="ur");
xgrid(1);
// Plot a second random function
subplot(2,1,2); plot(rand(1,100),'b-x');
a=gca();
a.tight_limits="on";
legends(["rand1"],[2],opt="ur");
xgrid(1);
// Export plot into gif and delete the current graphical window
xs2gif(i,sprintf('image_%d.gif',i));
xdel(i);
end
This program runs within 75s with Scilab 5.0.2 on my computer.
Now, it runs within only 5s with Scilab 4.1.2 on the same computer.
Is there an explanation for this lack of performance reached by 5.0.2?
Is there a way to improve the function above to get a fast result with 5.0.2?
The best way would be not to create a visible graphical window but
create a "virtual graphical window" instead that cannot be seen but
that can be used to export graphics.
Any idea about how to do such a thing?
Thanks a lot in advance.
Cheers, B.
More information about the users
mailing list