[scilab-Users] Saving figures

Samuel GOUGEON Samuel.Gougeon at univ-lemans.fr
Thu Oct 14 12:22:09 CEST 2010


  Hi Mathieu,

----- Message d'origine -----
De : Mathieu Dubois
Date : 14/10/2010 10:02:
> Hello,
>
> I have see that there is 2 way in scilab to save a figure (not exporting it):
>  - the generic save function (and the corresponding load function)
>  - the function xsave which is specific to graphics (and the corresponding 
> xload function)
>
> Is there a difference in the 2 functions? For instance if I save a figure with 
> xsave can I load it with load?
You are right, xsave() and xload() now look duplicates of save() and load().
IMO, they should be tagged as obsolete and then removed.
However, there are still some slight differences. Some tests with the
demo GUI => uicontrols 1  figure show the following features :

* xsave() and save() look the same for graphics, while xload() and load() do not.
* The drag & drop of a scg file into the console does the same as xload(), not 
as load()
* With xload() :
   - Ghosts of sub-menus are displayed in the menu bar
   - The figure number is set to the first available one
   - The size of the figure is not the original one
* With load() :
   - No ghosts of sub-menus
   - The original size of the figure is well recovered
   - The figure number is set to -31062

So,
- load() looks better than xload() (at least on this demanding example with 
uicontrols)
- Drag & drop should use load() instead of apparently xload()
- The original figure number should also be recovered if it is not already used
   by the running context.

Hoping reading your own comments,

Regards
Samuel

>
> I believe that functions starting with x (xsave, xdel, ...) are deprecated, 
> right?
>
> Mathieu




More information about the users mailing list