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 Center および File ExchangeColormaps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by