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

Réponses (1)

nouseforaname
nouseforaname le 18 Juin 2020

0 votes

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!

Catégories

En savoir plus sur Just for fun dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by