loglog plots don't always use log scale

11 Ansichten (letzte 30 Tage)
Dan Schult
Dan Schult am 21 Okt. 2020
Kommentiert: Dimas Tiar am 29 Jun. 2023
Sometimes using loglog does not change the scale to a logarithmic scale.
h=10.^-(0:5);
err=[1.4 1.04 1.004 1.0004 1.00004 1.000004];
loglog(h,err,'-o')
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?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 21 Okt. 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.
  2 Kommentare
Dan Schult
Dan Schult am 21 Okt. 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!
Dimas Tiar
Dimas Tiar am 29 Jun. 2023
Hi, How do I equalize the log scale in the y axis as it does in the x axis? How we make the y axis also on log 10 scale (to be similar with the x axis) even though the y axis value range is much smaller than x axis?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Log Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by