전설의 크기를 직접 변경하는 방법을 알지 못합니다. 텍스트의 길이에 따라 항상 자동으로 계산됩니다. 그러나 동등한 크기의 플롯을 얻을 수있는 솔루션이 있습니다. 축의 margins
속성을 사용하여 플롯의 크기를 설정할 수 있습니다. 두 번째 숫자는 오른쪽에있는 "빈"의 공간의 크기를 조절한다 :
x=1:0.1:6; //generate some data
y=[sin(x);sin(2*x)];
scf(0); clf(0);
subplot(2,1,1);
plot2d(x',y');
a=gca(); //get the current axes
a.margins=[0.05,0.2,0.125,0.125]; //set the margins
legend("y1","y2",-1,%T);
subplot(2,1,2);
plot2d(x',y');
a=gca(); //get the current axes
a.margins=[0.05,0.2,0.125,0.125]; //set the same margins to get equally sized plots
legend("y___1","y____2",-1,%T);
도움말 말한다 : 벡터 [margin_left, margin_right, margin_top가 margin_bottom] 지정이위한 여백 부 축. 이 벡터는 [0 1] ~ [0.125 0.125 0.125 0.125] 사이의 숫자로 구성됩니다. 이 수는 margin_left 및 margin_right의 너비와 margin_top 및 margin_bottom의 너비 인 axes_bounds 속성의 관련 값과 관련된 비율입니다.