A pause is needed between resizing a window and saving the figure

I tried to export in PNG a figure that was resized to get a bigger one. The window was resized, but the PNG figure was kept small…

I have finally had the intuition that it could be necessary to introduce a delay between resizing and saving, and it worked:

fig.figure_size = [1000, 1000] ;
sleep(200) ; 
xs2png(fig, 'fig.png') ;

(Scilab 2026.1.0)

1 Like

This should not be, should it not be, that it finishes the task figure_size and then after the task is finished it should make the png. this seem not procedural or task oriented.

M.f.G. Pascal

Yes, and it is a decent machine: Intel(R) Core™ i7-7700 CPU @ 3.60GHz with 4 bithread cores. Note that the figures are drawn after the heavy computation is finished.

I am working in Linux Fedora 44 (GNOME Desktop). I have not tested in other environments.