% 创建第一个图
figure;
subplot(3,1,1);
plot(data(:,1), data3(1:10,:) + 1, 'LineWidth', 3);
xlabel('Raman shift/cm^-1', 'LineWidth', 3);
ylabel('Intensity', 'LineWidth', 3);
title('PANC-NC-1', 'LineWidth', 3);
legend('1', '2', '3', '4', '5', '6', '7', '8', '9', '10');
% 创建第二个图
subplot(3,1,2);
plot(data(:,1), data3(11:20,:) + 1, 'LineWidth', 3);
xlabel('Raman shift/cm^-1', 'LineWidth', 3);
ylabel('Intensity', 'LineWidth', 3);
title('PANC-NC-2', 'LineWidth', 3);
legend('11', '12', '13', '14', '15', '16', '17', '18', '19', '20');
% 创建第三个图
subplot(3,1,3);
plot(data(:,1), data3(21:30,:) + 1, 'LineWidth', 3);
xlabel('Raman shift/cm^-1', 'LineWidth', 3);
ylabel('Intensity', 'LineWidth', 3);
title('PANC1', 'LineWidth', 3);
legend('21', '22', '23', '24', '25', '26', '27', '28', '29', '30');
这段代码能够添加图标和颜色,然后绘制在同一个图中虽然图示效果不好,但是可以记住用法
% 创建第一个大图
figure;
plot(data(:,1), data3(1:10,:) + 1, 'LineWidth', 3);
xlabel('Raman shift/cm^-1', 'LineWidth', 3);
ylabel('Intensity', 'LineWidth', 3);
title('PANC-NC-1', 'LineWidth', 3);
legend('1', '2', '3', '4', '5', '6', '7', '8', '9', '10');
% 创建第二个大图
figure;
plot(data(:,1), data3(11:20,:) + 1, 'LineWidth', 3);
xlabel('Raman shift/cm^-1', 'LineWidth', 3);
ylabel('Intensity', 'LineWidth', 3);
title('PANC-NC-2', 'LineWidth', 3);
legend('11', '12', '13', '14', '15', '16', '17', '18', '19', '20');
% 创建第三个大图
figure;
plot(data(:,1), data3(21:30,:) + 1, 'LineWidth', 3);
xlabel('Raman shift/cm^-1', 'LineWidth', 3);
ylabel('Intensity', 'LineWidth', 3);
title('PANC1', 'LineWidth', 3);
legend('21', '22', '23', '24', '25', '26', '27', '28', '29', '30');
这部分是将他们单独绘制。可以参考