필터 지우기
필터 지우기

semilog plot axis labels

조회 수: 9 (최근 30일)
Sean Smith
Sean Smith 2011년 11월 25일
I am trying to make a semilogy plot and it is giving me y-axis labels of 10^3, 10^4, 10^5....10^10 with tiny tics in between each. I want it to be 10^2, 10^4, 10^6...10^10 and without all the tiny ticks in between. I tried
ylim([10^2, 10^10]);
set(gca, 'ytick', (10^2):(10^2):(10^10));
but when I run it matlab just says "busy" and then usually crashes. It doesn't do this when I don't try to change the labels it works fine. Any ideas what to do? Why is it crashing when I am just changing the labels?

채택된 답변

Walter Roberson
Walter Roberson 2011년 11월 25일
set(gca, 'ytick', 10.^(2:2:10));
Your expression (10^2):(10^2):(10^10) means to start at 10^2 and to add 10^2 each time until 10^10 is reached. That would be a vector of (10^8 + 1) ticks.
  댓글 수: 1
Sean Smith
Sean Smith 2011년 11월 25일
Thank You!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by