[Scilab-users] RE(2): plotxxyyy

Jens Simon Strom j.s.strom at hslmg.de
Tue Oct 11 19:20:14 CEST 2016


Hi Frieder,
Here comes a different approach! By the nature of your  non equidistant 
measuremet times there may be point clusters  - difficult to separate. 
The idea is to plot  the measurement number stacked on a sawtooth curve, 
thus separating them and render them readable. This is a substitute of a 
second x-axis.

Try the following snippet with your original ugly:-) data.

format(12)
//Your data
DataText=[  
'03.04.2012 08:49:20.090 46476.4940 0.00 478.61 0.53  0   0   0   1   0   0   0'   
'03.04.2012 09:42:42.120 46476.4940 0.00 1150.71 0.24  0   0   0   1   0   0   0'  
'03.04.2012 09:43:03.350 46476.4940 0.00 1059.06 0.24  0   1   0   1   0   0   0'   
'03.04.2012 09:43:03.550 46476.4940 0.00 1059.06 0.24  0   1   1   1   1   0   0'   
'03.04.2012 09:43:09.460 46476.4945 1.70 1059.06 0.24  0   1   1   1   1   0   0'];

nM=size(DataText,'r')//number of measurements
distoff=46000;//Offset for distance (not to exeed the plot resolution)
D=    evstr(part(DataText,[1:2]));
M=    evstr(part(DataText,[4:5]));
Y=    evstr(part(DataText,[7:10]));
h=    evstr(part(DataText,[12:13]));
m=    evstr(part(DataText,[15:16]));
s=    evstr(part(DataText,[18:22]));
dist=evstr(part(DataText,[25:34]))  -  distoff;   
TimeInDays  =  datenum(Y,  M,  D,  h,  m,  s);
TimeInHours  =(TimeInDays-TimeInDays(1))*24;
xdel();
plot(TimeInHours,dist,'+-r')
ca=gca();
ca.data_bounds=ca.data_bounds+[-0.02  -0.0001   //get margins
                                 0.02   0.0001];
ca.tight_limits="on";

//The idea <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
nstack=6;//height of number stack
yspan=max(dist)-min(dist);
for  i=1:nM//measurement number
   xstring(TimeInHours(i),dist(1)+(modulo(i,nstack)-1)*0.05*yspan,string(i))
end



The abscissa of the point numbers are related to the measurement times; 
the ordinates only target readability.

Regards, Jens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161011/be30622a/attachment.htm>


More information about the users mailing list