I've been using Scilab 4.1.2 until now and was waiting for version 5.X
to become more mature. The new 5.3 beta version looks great so I
started playing with it.
In most of my projects I use menus on graphics figures to select a
plot to display. To clear the last plotted figure I used xbasc() which
only cleared the graphics window but left the added menus. In the new
Scilab versions the clf() function clears the entire figure including
the added menus.
Is there any equivalent for xbasc function in Scilab 5.X?
Thanks,
Moti
> In most of my projects I use menus on graphics figures to select a
> plot to display. To clear the last plotted figure I used xbasc() which
> only cleared the graphics window but left the added menus. In the new
> Scilab versions the clf() function clears the entire figure including
> the added menus.
> Is there any equivalent for xbasc function in Scilab 5.X?
if the current figure has only one axes that you want to clear,
you may do:
delete(gca())
if it has several axes or other elements that you want to clear,
except menus, you may use:
f=gcf(); C=f.children;
for i=1:length(C), c=C(i); if c.type~="uimenu", delete(c), end, end
There is no function resuming that, i guess because you may want
to keep other components such that some uicontrols, etc. So you
can easily write any customized clear_figures_how_you_want() as
wished.
Regards
Samuel
That did the trick. It is not compatible to Scilab 4.1.2 but I found a
way to solve that.
Thanks,
Moti