<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 20/07/2018 à 14:40, Samuel Gougeon a
écrit :<br>
</div>
<blockquote cite="mid:492b6d4b-6823-e0e7-6ed9-2be6b51b4d12@free.fr"
type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Le 20/07/2018 à 12:20, David Chèze a
écrit :<br>
</div>
<blockquote cite="mid:1532082036266-0.post@n3.nabble.com"
type="cite">
<pre wrap="">Hi Pat and all,
I was looking for similar simple feature for plotting time series with
readable date time format and I can share an intermediate approach to update
the x-ticks with a call to function labxdtv(), cf linked file labxdtv.sci
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://mailinglists.scilab.org/file/t375348/labxdtv.sci"><http://mailinglists.scilab.org/file/t375348/labxdtv.sci></a>
There's no callback function, the function is called after the plot action
and after every changes in windows size or zoom level : initial plot is like
plot2(dtnm,Donnees), with dtnm a vector of datenum values and Donnees a
matrix of related data to plot. After the figure is plot at first time or
after every changes in windows size or level of zoom, call again labxdtv, it
regraduates automatically the x-axis according to the datanum span and
convert the datenum in readable date time vector format (auto_ticks are set
to on in the function).
Would be great to have in scilab a more powerful/flexible builtin
function... :) </pre>
</blockquote>
<br>
Sure, but it's a rather complex function. The need was reported 10
years ago @ <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://bugzilla.scilab.org/6228">http://bugzilla.scilab.org/6228</a><br>
labxdtv() gives a rather raw idea of the task. On it's showcase
example, ticks are every 3 months over one year:<br>
<img src="cid:part3.0AF23251.F478841A@free.fr" alt=""><br>
But they are not nice:<br>
<ul>
<li>At this scale, major ticks should rather be on the 1st of
months.</li>
<li>there should not be any shift 17 => 18 => 19. This
means that subticking must be completely customized, with a
polyline superimposed to the axis, since it is irregular.</li>
<li>here there is only one subtick instead of rather two (for an
automatic handling)</li>
</ul>
</blockquote>
<br>
Even better, subticks could match weeks, for instance on each monday
00:00:00 (as the default, or as a subticking option).<br>
This means that the first subtick after a major on the 1st at
00:00:00 will be shifted wrt its leading major, with a shift not
equal from a major to the next.<br>
Here, having 11-12 weekly subticks between 2 major ticks would be
the right subticking scale.<br>
If we use some subticks every 10 days instead of weekly ones, there
will be also some irregularities for 28|29|31-days-long months for
setting the last subtick.<br>
All these details -- and others -- must be properly processed to
really have a workable function.<br>
<br>
</body>
</html>