[Scilab-users] figure exported before graphical refresh
Antoine Monmayrant
antoine.monmayrant at laas.fr
Tue Jan 29 11:06:27 CET 2013
On 29/01/2013 10:39, Dang, Christophe wrote:
> 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?
Hi,
I would say yes, but anyway if you wait ~10 minutes, you'll Get
Sylvestre answer ;)
By the way, I also experienced this race condition some times ago but I
did not have time to write a demo to reproduce this bug reliably.
Antoine
>
> 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
>
> // ********************
>
More information about the users
mailing list