I have four columns (x,y1,y2,y3) that I want to plot. x is a 'MM/dd/yy HH:mm' format. When I plot it, I wish only the time to presented i.e. 'HH:mm'. Converting to timeseries does not help as well…
sun = importfile_sun3('sun.csv', 2, 289);sun.LocalTime=datetime(sun.LocalTime,'InputFormat','MM/dd/yy HH:mm');sun=sortrows(sun,'LocalTime');%x=sun.LocalTime;
x=timeseries(sun.LocalTime);x.TimeInfo.Format='HH:mm';y1=sun.PowerMW;y2=sun.PowerMW1;y3=sun.PowerMW2;figure;hAx=plotyy(x,y1,[x,x],[y2,y3]);xlabel('Time (5min) increments')ylabel(hAx(1),'Actual - Power (MW)')
How can I remove the date part of the time stamp? Thank you,
Best Answer