필터 지우기
필터 지우기

Problems with Yticks, help?

조회 수: 16 (최근 30일)
Yordani
Yordani 2023년 3월 16일
답변: Walter Roberson 2023년 3월 16일
I'm trying to make my graphic have the labels I want but I only get 3, can someone help me?
FluxTotal= [6.5618e7, 1.1965e6, 1.3074e6, 9.4695e5, 7.6239e5];
Distancia= [1,10,100,1000,10000];
loglog(Distancia,FluxTotal)
yticks([1e4, 1e5, 1e6, 1e7, 1e8])
  댓글 수: 1
VBBV
VBBV 2023년 3월 16일
FluxTotal= [6.5618e7, 1.1965e6, 1.3074e6, 9.4695e5, 7.6239e5];
Distancia= [1,10,100,1000,10000];
loglog(Distancia,FluxTotal)
ylim([1e4 1e8])
yticks([1e4, 1e5, 1e6, 1e7, 1e8])

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

답변 (1개)

Walter Roberson
Walter Roberson 2023년 3월 16일
Ticks are only drawn if they fit within the axes limits. The default axes limits are determined by rounding the range of data. You do not have any data near part of the range of your ticks.
VBBV correctly shows an example of calling ylim to force the limits to include the range; I am just explaining in more detail.

카테고리

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