[Scilab-users] save and load

Samuel Gougeon sgougeon at free.fr
Sat Apr 24 18:44:02 CEST 2021


Le 20/04/2021 à 14:53, Antoine Monmayrant a écrit :
>
> Hello Anna,
>
> 3 points:
>
> (1) Could you post a minimum working example?
> Because your code below cannot run, many variables are missing.
>
> (2) Usually, you'd better use xload/xsave to save & restore graphics
>
> (3) There seems to be a bug, as the following code:
>
>     h=scf()
>     plot()
>     h.children(1).x_ticks.labels="Anna"+h.children(1).x_ticks.labels;
>     sleep(100)// just in case it's a race condition
>     xsave(TMPDIR+"/tata.sod",h);
>     xdel(winsid())
>     xload(TMPDIR+"/tata.sod")
>
> Does not restore the modified x_ticks properly...
>
> Does anyone know whether this is a known bug?
>
It is not yet reported. It is a regression brought by Scilab 6.0.0

There is a likely related strange feature:

plot2d()
ax  =  gca();
ax.x_ticks.labels="Anna"+ax.x_ticks.labels;
// See new labels
ax.auto_ticks(1)   // automatically set to "off"by manual setting
ax.auto_ticks(1)  =  "on";
// See restored numeric labels
// AND NOW:
ax.auto_ticks(1)  =  "off";
// Former "Anna"ed labels restored! So they were kept somewhere, despite the
// ax.auto_ticks(1) = "on"; restoration in the mean time...

Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20210424/840e5bd4/attachment.htm>


More information about the users mailing list