MATLAB Answers

loglog plots don't always use log scale

2 views (last 30 days)
Dan Schult
Dan Schult on 21 Oct 2020
Commented: Dan Schult on 21 Oct 2020
Sometimes using loglog does not change the scale to a logarithmic scale.
err=[1.4 1.04 1.004 1.0004 1.00004 1.000004];
The y-axis is not a log-scale. Indeed, using loglog(err, err) makes both axes not use a log scale.
How does loglog choose? Or is this a bug?

Accepted Answer

Walter Roberson
Walter Roberson on 21 Oct 2020
The y axis is on log scale. Compare the distance between the bottom (1.0) and the tick above it (1.05) to the distance between the top two ticks (1.35 to 1.4). Obvious difference.
  1 Comment
Dan Schult
Dan Schult on 21 Oct 2020
Aha... The range of values is so small, the scale isn't as obviously log as the x-axis. But it is!!
Thank you for your answer!

Sign in to comment.

More Answers (0)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by