[Scilab-users] Simple Date & Time Plotting
Samuel Gougeon
sgougeon at free.fr
Fri Jul 20 14:40:49 CEST 2018
Le 20/07/2018 à 12:20, David Chèze a écrit :
> 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
> <http://mailinglists.scilab.org/file/t375348/labxdtv.sci>
> 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... :)
Sure, but it's a rather complex function. The need was reported 10 years
ago @ http://bugzilla.scilab.org/6228
labxdtv() gives a rather raw idea of the task. On it's showcase example,
ticks are every 3 months over one year:
But they are not nice:
* At this scale, major ticks should rather be on the 1st of months.
* 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.
* here there is only one subtick instead of rather two (for an
automatic handling)
* etc..
So yes, a powerful function formating dates would be nice. But
implementing a really nice and useful one is definitely not trivial.
Cheers
Samuel
PS : there is presently no event triggered by zooming or panning an axes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180720/fde2bb92/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kfppldgkikokegmi.png
Type: image/png
Size: 1708 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20180720/fde2bb92/attachment.png>
More information about the users
mailing list