How to apply datetick property on non active plot
Ältere Kommentare anzeigen
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.!
Antworten (1)
nouseforaname
am 18 Jun. 2020
0 Stimmen
Kategorien
Mehr zu Dates and Time finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!