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.!

Answers (1)

Seems like that this forum is dead!? Yet non of my questions was answered. If something is wrong regarding the question is formulated, please give me a hint, thx!

Categories

Asked:

on 17 Jun 2020

Answered:

on 18 Jun 2020

Community Treasure Hunt

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

Start Hunting!