Azzera filtri
Azzera filtri

Plotting with same axis titles

2 visualizzazioni (ultimi 30 giorni)
Austen Thomas
Austen Thomas il 12 Giu 2019
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)

Risposte (0)

Categorie

Scopri di più su Colormaps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by