非常感谢!
但是这样画出来的图示会和第四个图重合,
如果我只画前三个图,然后把图示直接画在第四个图里,有没有办法?
clear
clc
x=linspace(-2,2);
subplot 221
plot(x,sin(x),'r');
subplot 223
plot(x,sin(2*x),'g');
subplot 224
plot(x,sin(3*x),'b');
a=axes('visible','off');
hold on;
plot(0,0,'r');
plot(0,0,'g');
plot(0,0,'b');
legend('sin x','sin 2x','sin 3x','location','northeast')