필터 지우기
필터 지우기

How to change the relative scaling of my x-axis

조회 수: 1 (최근 30일)
pete4466
pete4466 2022년 3월 20일
댓글: Star Strider 2022년 3월 20일
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

채택된 답변

Star Strider
Star Strider 2022년 3월 20일
See if the semilogx function produces the desired result.
  댓글 수: 2
pete4466
pete4466 2022년 3월 20일
That works perfectly thank you
Star Strider
Star Strider 2022년 3월 20일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by