x = 1:20;
f1 = exp(x);
f2 = x.^3;
% Top left: Linear
subplot(2, 2, 1)
plot(x, f1, x, f2)
title('Linear')
xlabel('x')
ylabel('y')
legend('e^x', 'x^3')
% Top right: Log-log
subplot(2, 2, 2)
loglog(x, f1, x, f2)
title('Log-Log')
xlabel('x')
ylabel('y')
legend('e^x', 'x^3')
% Bottom left: Semilog-x
subplot(2, 2, 3)
semilogx(x, f1, x, f2)
title('Semilog-X')
xlabel('x')
ylabel('y')
legend('e^x', 'x^3')
% Bottom right: Semilog-y
subplot(2, 2, 4)
semilogy(x, f1, x, f2)
title('Semilog-Y')
xlabel('x')
ylabel('y')
legend('e^x', 'x^3')

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: