%A few examples of basic plots clear; f = figure(1); set(f,'position',[1 31 1280 920]); %Generate random data sets for plots r1 = rand(10,1); r2 = rand(10,1); r3 = rand(10); %1. Scatter plot s(1) = subplot(2,3,1);hold on; scatter(r1,r2); scatter(r2,r1,'r'); t(1) = title('scatter(x,y)'); %2. Bar plot s(2) = subplot(2,3,2); bar(r1); set(gca,'xlim',[0 11]); t(2) = title('bar(x)'); %3. Histogram plot s(3) = subplot(2,3,3); hist(r1); t(3) = title('hist(x)'); %4. Mesh plot s(4) = subplot(2,3,4); mesh(r3); t(4) = title('mesh(z)'); %5. Surface plot s(5) = subplot(2,3,5); surf(r3); t(5) = title('surf(z)'); %6. Log plot s(6) = subplot(2,3,6); x = 1:10; semilogy(x,4.^-x); t(6) = title('semilogy(x,4^{-x})'); %7. Adjust the fontsize of titles and axes all at the end set(t,'fontsize',20); set(s,'fontsize',20);