필터 지우기
필터 지우기

Plotting with same axis titles

조회 수: 2 (최근 30일)
Austen Thomas
Austen Thomas 2019년 6월 12일
Hi all,
I need a little help with orginzing my code. I went to get rid of some of the uneeded code if possible. As seen in the code beloew the axes have the same titles, set fonts, scales, edge/facecolor. But have different figure names. Is there any way to get rid of some of the extra lines it does not matter if its all of them just want to get rid of a good amount???
% Create Plot for 1
figure(1)
subplot(2,1,1)
f1 = surf(X,Y,Z1);
f1.FaceColor = 'interp';
f1.EdgeColor = 'interp';
% Define axes and graph titles for 1
colormap jet
colorbar
caxis ([10e-7 10e-5])
set(gca,'YScale','log','ColorScale','log','FontName', 'Times New Roman', 'FontSize', 10)
xlabel('Position')
ylabel('Intensity')
title('Start 1')
view(2)
subplot(2,1,2)
f2 = surf(X,Y,Z2);
f2.FaceColor = 'interp';
f2.EdgeColor = 'interp';
%Define axes and graph titles for2
colormap jet
colorbar
caxis([10e-15 10e-5])
set(gca,'YScale','log','ColorScale','log','FontName', 'Times New Roman', 'FontSize', 10)
xlabel('Position')
ylabel('Intensity')
title('Start 2')
view(2)

답변 (0개)

카테고리

Help CenterFile Exchange에서 Colormaps에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by