オクターブを使用しています。私の問題はこれです:散布図の泡を埋めるだけでなく、凡例を配置したいです。しかし、を使用しようとするとエラーが発生し、を使用'filled'
しても凡例が表示されませんlegend(...)
。私のコードの一部は次のようになります:
%ALL SAMPLES, PHI(Signal) @ THETA(Sample)=0
figure(5)
plot( Angles(:,1)([18:27]), ALL([18:27]), 10, [1 0 1]); %Magenta
hold on
scatter(Angles(:,1)([68:76]), ALL([68:76]), 10, [0 0 0]); %Black
scatter(Angles(:,1)([86:95]), ALL([86:95]), 10, [1 0 0]); %Red
scatter(Angles(:,1)([119:127]), ALL([119:127]), 10, [0 1 0]); %Green
scatter(Angles(:,1)([133:141]), ALL([133:141]), 10, [0 0 1]); %Blue
hold off
xlabel('Signal PMT angle (Sample angle at 0)');
ylabel('Normalized (signal/monitor) intensity');
legend('Control', 'Control', '1+2','Virgin','Cycle #1', 'Location','NorthEast');
title('Plot of All Samples, "-int Intensity"')
あるべきだとわかっていますがplot( Angles(:,1)([18:27]), ALL([18:27]), 10, [1 0 1], 'filled');
、そうするとエラーが発生します。また、伝説は決して現れないようです。