Home > matutils > date_axis.m

date_axis

PURPOSE ^

function date_axis

SYNOPSIS ^

function date_axis

DESCRIPTION ^

 function date_axis

 take a plot that has MJD on the axis and turn it into a real date
 Make axis have dates

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function date_axis
0002 % function date_axis
0003 %
0004 % take a plot that has MJD on the axis and turn it into a real date
0005 % Make axis have dates
0006 lab=get(gca,'XTickLabel');
0007 for i=1:size(lab,1)
0008   label(i)=eval(sprintf('10000*%s',lab(i,:)));
0009 end
0010 clear lab
0011 [y m d]=mjd2date(label);
0012 for i=1:length(label)
0013   lab{i}=sprintf('%d/%d',m(i),d(i));
0014 end
0015 set(gca,'XTickLabel',lab);
0016

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005