在 MATLAB 中使用句柄调用 dateaxis 函数

Calling dateaxis function using handles in MATLAB

如您所知,我们可以使用 MATLAB 句柄调用不同的绘图函数,例如:

plot(handles.axes,data);
hold(handles.axes,'on')
plot(handles.axes,ab2,data2,':r');
title(handles.axes','my title');
legend(handles.axes,'mm','ab','Location','Best');
grid on;
ylabel(handles.axes,'y label);

我们如何使用句柄调用 dateaxis 函数?我想将我的 x 轴值转换为日期。 dateaxis(handles.axes,12) 没用。

您可能想使用 datetick,它允许您以与 plot:

相同的方式指定您希望应用更改的轴
datetick(axes_handle,...)