-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotDualSurf.m
More file actions
21 lines (18 loc) · 845 Bytes
/
Copy pathplotDualSurf.m
File metadata and controls
21 lines (18 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
%% Helper function to simplify plotting
% Michael Nickerson 2019
% plotDualSurf(x,y,z, num, title, xla, yla, zla)
% Plots a surface with 2D and 3D view
function plotDualSurf(x,y,z, num, title, xla, yla, zla)
% Generate Plot with two views
figure(num); figureSize(gcf, 1200, 500);
subplot(1,2,1); surf(x, y, z); view(2); axis vis3d;
shading interp; colormap jet; ylabel(colorbar, zla);
xlabel(xla); ylabel(yla); zlabel(zla);
subplot(1,2,2); surf(x, y, z); view(3); axis vis3d;
shading interp; colormap jet;
xlabel(xla); ylabel(yla); zlabel(zla);
% Build title axes and title.
axes('Position', [0, 1, 1, 0.05], 'Visible', 'off' ) ;
text(0.5, -0.25, title, 'FontSize', '14', 'FontWeight', 'Bold', 'VerticalAlignment', 'Top', 'HorizontalAlignment', 'Center' ) ;
drawnow; % Immediate display
end