Filter löschen
Filter löschen

How to change the relative scaling of my x-axis

2 Ansichten (letzte 30 Tage)
pete4466
pete4466 am 20 Mär. 2022
Kommentiert: Star Strider am 20 Mär. 2022
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

Akzeptierte Antwort

Star Strider
Star Strider am 20 Mär. 2022
See if the semilogx function produces the desired result.
  2 Kommentare
pete4466
pete4466 am 20 Mär. 2022
That works perfectly thank you
Star Strider
Star Strider am 20 Mär. 2022
As always, my pleasure!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by