clf axis([-2 2 -2 2]) box on hold on h = 1/64; x = -2:h:2; w = exp(x); p(1) = plot(x,w); p(2) = plot(w,x); plot([-2 2],[0 0],'k') plot([0 0],[-2 2],'k') plot([-2 2],[-2 2],'k--') set(p,'linewidth',1.5) set(gca,'xtick',[-2 -1 0 1 2], ... 'xticklabels',{'-2','-1','0','1','2'}) set(gca,'ytick',[-2 -1 0 1 2], ... 'yticklabels',{'-2',-1','0','1','2'}) legend('exp(x)','log(x)','location','northwest') title('log(x)') hold