File Exchange

image thumbnail

Datetick Zoom, Pan & Subplot with Day of Year

version 1.0.0.0 (15.2 KB) by David
Date formatted tick labels, auto updated when zoomed or panned with Day of Year formats added.

3 Downloads

Updated 23 Nov 2009

View License

This is an addendum to DATETICK2 which allowed time axis re-labeling when the plot is zoomed or panned. Day of Year format sets were added to the time label formats.

Example:
x = [733043:pi/10:733043+2*365];
y = sin((x-733043)/30)+rand(size(x));
figure;plot(x,y,'-o');
grid on
set(gcf,'color',[1 1 1]);
datetick2_doy('x',34);

Then zoom or pan as needed and the time axis will update the tick marks.

Cite As

David (2020). Datetick Zoom, Pan & Subplot with Day of Year (https://www.mathworks.com/matlabcentral/fileexchange/25927-datetick-zoom-pan-subplot-with-day-of-year), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Yan

There's one Pick of the Week called zoomAdaptiveDateTicks
http://www.mathworks.com/matlabcentral/fileexchange/15342

which is <20 lines and works great.

MATLAB Release Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Datetick with zooming panning and subplots

Inspired: cbdate