Зависит от того, хотите ли вы создать axes
с правой стороны графического интерфейса или, если вы хотите разбить эти оси на участки.Следующий ответ делает оба.
// Lets define a figure with a gridbag layout
fig=figure('layout','gridbag')
// Lets define a frame
frameleft=uicontrol(fig,..
'style','frame',..
'BackgroundColor',[0.2,0.2,0.8],.. // blue so visible
'constraints',createConstraints("gridbag", [1,1,1,1],[1,1],'both','center')) // make it use all the available space
// lets define a right frame : just position it a x = 2, this
// will move frameleft to the left
frameright=uicontrol(fig,..
'style','frame',..
'BackgroundColor',[0.2,0.8,0.2],.. // green
'constraints',createConstraints("gridbag", [2,1,1,1],[1,1],'both','center')) // all the available space from x=2
// then to plot, lets create axes relatives to frameright
a = newaxes(frameright)
// Then all commands works as usual
title('Title')
subplot(1,2,2)
plot2d()
производит
