Plotting with same axis titles
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!