How to apply datetick property on non active plot
이전 댓글 표시
Hi community,
I've build a figure including subplots:
function testfunc(data,attrib)
tiledlayout(2,2);
l1=nexttile;
plot(data(:,1),data(:,2),"r")
hold on
plot(data(:,1),data(:,4),"b")
legend(char(attrib(1,2)),char(attrib(1,4)));
%datetick('x',10)
hold off
l2=nexttile;
plot(data(end-250:end,1),data(end-250:end,2),"r")
hold on
plot(data(end-250:end,1),data(end-250:end,4),"b");
legend(char(attrib(1,2)),char(attrib(1,4)));
%datetick('x',3);
hold off
l3=nexttile;
bar(data(:,1),data(:,8),1.1,'g');
legend(char(attrib(1,8)));
%datetick('x',10);
l4=nexttile;
bar(data(end-250:end,1),data(end-250:end,8),1.1,'g');
legend(char(attrib(1,8)));
%datetick('x',3);
end
I want to set the datetick property for all subplots after the compete code is executed. How to handle this?
Thx.!
답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Dates and Time에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!