[Scilab-users] save and load

anna28 parravicini.anna at gmail.com
Tue Apr 20 16:06:18 CEST 2021


Hello Antoine,

the point is exactly what you point out with your example (here below you
can find my working script, but your example is enough to understand my
problem).

If I don't modify the x-label ticks, everything is fine. If I modify x-label
ticks, they are not loaded.

I use "xsave" and "load"... if I use "xload" a blank rectangle  appears over
the loaded figure and I cannot see my graph.

cheers
Anna


===
f=scf();
f.figure_position=[10,10]
f.figure_size=[1000,700]
clf;
title("positions", 'fontsize',4);

xsetech([0,0,1,0.95]);
mark=['r.-','g.-','k.-','b.-','m.-','r:.','g:.','k:.','b:.',,'m:.','.r-.','.g-.'];
puName=["aa" "bb" "cc" "dd" "ee" "ff" "gg" "hh" "ii"];
loc=[12008.0;12011.0;12012.0;12013.0;12014.0;12015.0;12016.0;12017.0;12018.0;12019.0;12020.0;12032.0;12033.0;12035.0;12036.0;12037.0;12038.0;12039.0;12040.0;12041.0];
orbitMean=[1.11       -2.362       3.1155      4.261      -0.8815     -3.22      
-2.552      -0.673       3.709    
   1.1284     -2.3604      3.1156      4.2544     -0.8862     -3.2234    
-2.5524     -0.6836      3.7182   
   1.1098889  -2.3558889   3.102       4.2385556  -0.8864444  -3.2128889 
-2.5352222  -0.6823333   3.7017778
   1.1025     -2.355       3.1005      4.2335     -0.8845     -3.21275   
-2.5325     -0.6815      3.69825  
   1.102      -2.3515      3.104       4.226      -0.8845     -3.209     
-2.522      -0.678       3.695    
   1.1104     -2.3438      3.0876      4.2264     -0.8766     -3.1932    
-2.5194     -0.6836      3.681    
   1.122      -2.3498      3.1012      4.2384     -0.8872     -3.2168    
-2.5398     -0.6776      3.706    
   1.1143333  -2.3473333   3.095       4.2253333  -0.8743333  -3.199     
-2.5246667  -0.6826667   3.69     
   1.1053333  -2.3556667   3.1038333   4.2415     -0.879      -3.2081667 
-2.5393333  -0.6815      3.7086667
   1.0955     -2.3615      3.0965      4.24       -0.891      -3.2275    
-2.5625     -0.668       3.7165   
   1.0872857  -2.358       3.0995714   4.2322857  -0.8851429  -3.2104286 
-2.5382857  -0.6798571   3.7028571
   1.1075     -2.35225     3.1015      4.258      -0.882375   -3.19875   
-2.557375   -0.68825     3.707    
   1.0935     -2.3458333   3.1081667   4.2461667  -0.8866667  -3.2165    
-2.5461667  -0.6761667   3.7065   
   1.1035     -2.3513333   3.1016667   4.2533333  -0.8846667  -3.2125    
-2.5488333  -0.6783333   3.7081667
   1.088      -2.3536667   3.1093333   4.2466667  -0.8923333  -3.2266667 
-2.548      -0.6673333   3.7136667
   1.0926667  -2.3453333   3.105       4.2456667  -0.881      -3.2176667 
-2.5413333  -0.673       3.7006667
   1.0963333  -2.3546667   3.11        4.2496667  -0.8893333  -3.2033333 
-2.546      -0.676       3.707    
   1.097625   -2.352625    3.1065      4.250375   -0.885625   -3.21425   
-2.5495     -0.67675     3.7115   
   1.1111429  -2.347       3.1092857   4.2537143  -0.889      -3.227     
-2.5605714  -0.6768571   3.7221429
   1.09775    -2.34325     3.10125     4.236      -0.88675    -3.222     
-2.53925    -0.672       3.695    ]
for j=1:size(puName,'c')
    plot(loc(:),orbitMean(:,j),mark(j),'thickness',2);
    // usando 'loc' come asse x, plotta le misure distanziate correttamente
nel tempo
end
labels_rot=["$\texttt {\rotatebox{90}{20210415h08}}$";"$\texttt
{\rotatebox{90}{20210415h11}}$";"$\texttt
{\rotatebox{90}{20210415h12}}$";"$\texttt
{\rotatebox{90}{20210415h13}}$";"$\texttt
{\rotatebox{90}{20210415h14}}$";"$\texttt
{\rotatebox{90}{20210415h15}}$";"$\texttt
{\rotatebox{90}{20210415h16}}$";"$\texttt
{\rotatebox{90}{20210415h17}}$";"$\texttt
{\rotatebox{90}{20210415h18}}$";"$\texttt
{\rotatebox{90}{20210415h19}}$";"$\texttt
{\rotatebox{90}{20210415h20}}$";"$\texttt
{\rotatebox{90}{20210416h08}}$";"$\texttt
{\rotatebox{90}{20210416h09}}$";"$\texttt
{\rotatebox{90}{20210416h11}}$";"$\texttt
{\rotatebox{90}{20210416h12}}$";"$\texttt {\rotatebox{90}{20210416h13}}$";
"$\texttt {\rotatebox{90}{20210416h14}}$";"$\texttt
{\rotatebox{90}{20210416h15}}$";"$\texttt
{\rotatebox{90}{20210416h16}}$";"$\texttt {\rotatebox{90}{20210416h17}}$"];
xgrid(33);
xlabel('measurement date [yyyymmdd_hh]','fontsize',3);
ylabel(" position [mm]",'fontsize',3);
legend(puName,-4);
a=gca();
a.x_ticks = tlist(["ticks" "locations", "labels"],loc(:),labels_rot(:));
a.font_size=3; 
xsave("foo.sod", f);



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html



More information about the users mailing list