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 Center および File ExchangeGraphics Objects についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by