[Scilab-users] figure exported before graphical refresh

Dang, Christophe Christophe.Dang at sidel.com
Tue Jan 29 10:39:39 CET 2013


Hello,

while trying to make an animation,
I noticed that some figures were exported with the wrong scale.

The scale is set by setting the data_bound axes property.

I supposed that the file was created before the scale was set,
so I introduced a sleep(100) and it solved the problem.

Here is a minimal code reproducing the problem;
the image is empty when the scale is not set.

Do I have to report any bug anywhere?

Regards

// ********************

f0 = scf(0);

xmin = 10; xmax = 60;

ymin = 0; ymax = 10;

for i = 10:60
    
    clf;
    
    xpoly([i, i+10, i], [0, 10, 20]);
    
    a = get('current_axes');
    
    a.data_bounds = [xmin, ymin ; xmax, ymax];
    
//    sleep(100);

    name=('test-anim'+string(i)+'.gif');
    
    xs2gif(0, name);
    
end

// ********************

-- 
Christophe Dang Ngoc Chan
Mechanical calculation engineer

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.





More information about the users mailing list