Set an Axis to a Logarithmic Scale

A logarithmic scale is multiplicative instead of additive like a linear scale. Each unit you move multiplies or divides by a fixed amount instead of adding or subtracting. This makes it possible to see data that’s both really big and really small at the same time, and makes it easier to see structure in some kinds of plots. Click on the GIF to open the graph.

Turn on logarithmic y-axis. GIF.

 

Change Scale

To set either axis to a logarithmic scale, first click Graph Settings Settings menu icon. Screenshot. or press CTRL+ALT+G.

From there, click More Options and then toggle either axis to logarithmic.

Screenshot of the graph settings with the more options menu open. Both the x and y axis are set to a logarithmic scale.

 

Additional Information

When an axis is set to a logarithmic scale, you’ll notice some interesting patterns. First, you’ll find that cycles repeat every power of 10. So the lines between 1 and 10 are exactly the same distance as between 10 and 100, or 100 and 1000. Second, within those, lines get closer together as your numbers increase:

Two logarithmic cycles between 1 and 100. Screenshot.

Since every line represents a common multiple instead of a common factor, the distance from 10 to 20 is the same as the distance from 20 to 40, or 40 to 80, or 1000 to 2000. You’ll notice that lines that are evenly spaced (10, 20, 30) on a linear plot are unevenly spaced on a logarithmic plot, getting narrower as you increase, until you reach 100, at which point it resets. You’ll also notice that the logarithmic values can get very small by zooming or panning, but they never reach 0 in the x- or the y-direction. Besides making it easier to display data that spans many orders of magnitude, logarithmic scales can also help to visualize the behavior of certain kinds of curves. Because there is a sense in which logarithms transform multiplication and division into addition and subtraction, logarithmic scales can plot multiplicative change in a way that appears linear. For example, exponential functions appear linear when the y-axis is logarithmic, and power functions appear linear when both axes are logarithmic. This might help you compare or reason about key features of different functions.

 

Explore

Screenshot of a plot of the diameter and the mass of all of the planets in the solar system.

Visualize relationships more easily with this graph that compares the diameter of each planet to its mass.

Screenshot of the plot of y=x^2 on a log x log scale

Listen to the curve using audio trace in a graph with both axes set to a linear scale. Then, change both axes to a logarithmic scale and listen to the curve with audiotrace again.

To use audio trace, select the first expression line and press Alt+T. Then, press H to hear the graph.

 

Learn More

Please write in with any questions or feedback to support@desmos.com.