How to get access into subplot properties

Hi, part of my code is:

subplot(1,2,1);
plot(x1,ugol,‘-o’);
f=gcf();
f.figure_position=[100,100];
f.children.tight_limits=“on”;
f.children.auto_scale=“on”;
f.children.data_bounds=[-10,10,-20,20];
xgrid();

subplot(1,2,2);
plot(S10,Gr,‘–’);
xgrid();
f=gcf();
f.children.tight_limits=“on”;
f.children.auto_scale=“off”;
f.children.data_bounds=[G1,G2,-200,200];

The first graph was drawing in needed margins [-10,20,-20,20]. But the second graph have not needed margines - [G1,G2,-200,200]. How can I get access to margines of second graph?

Hello,

You should try with:

a1 = subplot(1,2,1);
plot(x1,ugol,‘-o’);
f=gcf();
f.figure_position=[100,100];
a1.tight_limits=“on”;
a1.auto_scale=“on”;
a1.data_bounds=[-10,10,-20,20];
xgrid();

a2 = subplot(1,2,2);
plot(S10,Gr,‘–’);
xgrid();
a2.tight_limits=“on”;
a2.auto_scale=“off”;
a2.data_bounds=[G1,G2,-200,200];

Best regards.


It didn’t help out.

Can you send a screenshot to explain what the problem is?