clear all; close all; L=10; x=linspace(-L,L,100); y=x; % Functions to plot [X,Y]=meshgrid(x,y); m=1; % number of spirals u=tanh(sqrt(X.^2+Y.^2)).*cos(m*angle(X+i*Y)-(sqrt(X.^2+Y.^2))); v=cos(x); % Linewidths figure(1) plot(x,v,'m','Linewidth',6) % 2D plots figure(2), surf(x,y,u) figure(3), surfc(x,y,u) % with contour figure(4), surfl(x,y,u) % with lighting figure(5), mesh(x,y,u) figure(6), pcolor(x,y,u), colorbar % top view % colormaps/shading figure(7), surfl(x,y,u), shading interp, colormap(hot) figure(8), surfl(x,y,u), shading interp, colormap(gray) figure(9), surfl(x,y,u), shading interp, colormap(copper) % Combining Plots (no transperancy) figure(10) surfl(x,y,u+2), shading interp colormap(gray) view(45,30) hold on pcolor(x,y,u), shading interp % labels xlabel('x values','FontSize',[20]); ylabel('marathon','FontSize',[20]); title('cool stuff','FontSize',[25],'FontWeight','bold') set(gca,'Xlim',[-10 10], ... 'Xtick',[-10 -7.5 -5 -2.5 0 2.5 5 7.5 10], ... 'Xticklabel',{'-L',' ',' ',' ','0',' ',' ',' ','L'}, ... 'Ytick',[-10 -7.5 -5 -2.5 0 2.5 5 7.5 10], ... 'Yticklabel',{'-L',' ',' ',' ','0',' ',' ',' ','L'}, ... 'FontSize',[20],'Ztick',[0 1 2 3], ... 'Zticklabel',{'','-1','0','1'}) % Combining Plots (with transperancy and Greek characters) figure(11) surfl(x,y,u+2), shading interp colormap(gray) alpha(0.5) view(45,30) hold on pcolor(x,y,u), shading interp % labels xlabel('x values \mu \rho \alpha \beta','FontSize',[20]); ylabel('marathon \mu','FontSize',[20]); title('cool stuff','FontSize',[25],'FontWeight','bold') set(gca,'Xlim',[-10 10], ... 'Xtick',[-10 -7.5 -5 -2.5 0 2.5 5 7.5 10], ... 'Xticklabel',{'-L',' ',' ',' ','0',' ',' ',' ','L'}, ... 'Ytick',[-10 -7.5 -5 -2.5 0 2.5 5 7.5 10], ... 'Yticklabel',{'-L',' ',' ',' ','0',' ',' ',' ','L'}, ... 'FontSize',[20],'Ztick',[0 1 2 3], ... 'Zticklabel',{'','-1','0','1'}) % print -djpeg test.jpg