tlabel.m v2.6.1 (Sep 2009)
This program places dates on time axis as DATETICK and works with ZOOM and PAN as DATETICKZOOM by Christophe Lauwerys. But, it also shows the full date after zooming or panning by using the ticks and time-axis label. So, if you zoom in down to second, you won't loose "when" you are.
The input arguments are equal to those of DATETICK function, but if more than one axis handle is specified, they all will be LINKED!
Also, some other options are available, for example, the use of LOCAL LANGUAGE for the months (default), or the use of an specific date format: 'DD HH:MM SS.FFF' for example.
Besides, sometimes with DATETICK you don't get optimal results. This program (try to) fix this problem.
Just use it after some plot function with days (see DATENUM) in one of his axis (time-axis):
t = linspace(0,1) + now;
x = rand(size(t));
plot(t,x)
axis tight
tlabel % <----
Enjoy it!
Bugs reports and suggestions will be very appreciated!
Cite As
Carlos Adrian Vargas Aguilera (2022). tlabel.m v2.6.1 (Sep 2009) (https://www.mathworks.com/matlabcentral/fileexchange/19314-tlabel-m-v2-6-1-sep-2009), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired by: Datetickzoom - automatically update dateticks
Inspired: cbdate, linkzoom.m v1.3 (Aug 2009), Bar- and candle style graph for stocks, quiver2.m v1.2 (Nov 2009), addaxes.m v1.1 (Sep 2009), xunits, yunits and zunits.m (Jul 2014)
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.