Clear Filters
Clear Filters

How to change the relative scaling of my x-axis

1 view (last 30 days)
I am plotting values from a function on the y-axis against an array on the x-axis =
M_varied=[500,1000,2000,4000,8000,16000,32000,64000,128000,256000,512000,1024000,2048000,4096000,8192000,16384000]
The fact that the array values double in size for each index mean that the x-coordinates of my plotted values are very spread out and make my graph difficult to read
How do I change the scaling of the x-axis so that large values are proportionally closer to the smaller values, so the x-axis values aren't so spread out. For example I was hoping to have equally spaced x-ticks of 10^2, 10^3, 10^4 etc..?
Thanks

Accepted Answer

Star Strider
Star Strider on 20 Mar 2022
See if the semilogx function produces the desired result.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!