use of XTickLabel
use of XTickLabel
(OP)
Hello, everybody!
This is my question.
I am working on plots with ticks labels in date format.
I converted the data into Matlab's serial date format (using datenum), and then I converted the serial dates into a 'month/day' format using datestr using:
set(gca,'XTickLabel',{datestr(fname1(i,n),6)...
(fname1(:,n) contains the serial dates)
The problem is that the ticks in the X axis appear to pop up in an arbitrary position and I need them to be every time a new day starts.
Is there any way to force the ticks to appear in a determined position?
Hope anybody can help.
Thanks!
This is my question.
I am working on plots with ticks labels in date format.
I converted the data into Matlab's serial date format (using datenum), and then I converted the serial dates into a 'month/day' format using datestr using:
set(gca,'XTickLabel',{datestr(fname1(i,n),6)...
(fname1(:,n) contains the serial dates)
The problem is that the ticks in the X axis appear to pop up in an arbitrary position and I need them to be every time a new day starts.
Is there any way to force the ticks to appear in a determined position?
Hope anybody can help.
Thanks!





RE: use of XTickLabel
You can change the 'XTick' and 'YTick' properties of the axes. Use data units. For example:
set(gca,'YTick',[0:20:240],'XTick',[0:100:400]);
Joe
BSTEX - Equation viewer for Matlab
http://www.geocities.com/bstex2001
RE: use of XTickLabel
I'll give it a try