Why am I getting this Error during plot

조회 수: 1 (최근 30일)
liu James
liu James 2016년 11월 25일
답변: Walter Roberson 2016년 11월 26일
I'm getting this error. "There is no DatetimeTickFormat property on the Line class." I'm trying to have x axis show the dates rather than the serial date number.
% code
fts1 = fints(Time,Data,{'Open','High','Low','Close'})
high = fts2mat(fts1.High)
dates=datenum(Time,'yyyy/mm/dd')
window_size=20;
output=tsmovavg(high,'s',window_size,1);
plot(dates,output,'DatetimeTickFormat','dd-MMM-yyyy');
end
  댓글 수: 1
Walter Roberson
Walter Roberson 2016년 11월 25일
Which MATLAB version are you using?

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2016년 11월 26일
DatetimeTickFormat is supported only when one of the axes is in datetime or duration format, not for serial date numbers. It also requires R2014b or later.

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by