Produce a 2-D plot using logarithmic scales for both axes.
See the documentation of plot
for a description of the arguments
that loglog
will accept.
If the first argument hax is an axes handle, then plot into this axis,
rather than the current axes returned by gca
.
The optional return value h is a graphics handle to the created plot.
See also: plot, semilogx, semilogy.
The following code
clf; t = 1:0.01:10; x = sort ((t .* (1 + rand (size (t)))) .^ 2); y = (t .* (1 + rand (size (t)))) .^ 2; loglog (x, y); title ({"loglog() plot", "Both axes are logarithmic"});
Produces the following figure
Figure 1 |
---|
The following code
clf; a = logspace (-5, 1, 10); b =-logspace (-5, 1, 10); subplot (1,2,1); loglog (a, b); title ("loglog (a, b)"); subplot (1,2,2); loglog (a, abs (b)); set (gca, "ydir", "reverse"); title ("loglog (a, abs (b))");
Produces the following figure
Figure 1 |
---|
Package: octave