필터 지우기
필터 지우기

How to modify the values of axis (image explaining better)

조회 수: 1 (최근 30일)
Vasilis V
Vasilis V 2020년 3월 29일
댓글: Vasilis V 2020년 3월 29일
Hello, i hope you are all safe and healty. Sorry for talking your time but
i would really need some help here.
I have the following graph, but i tried with many ways and i
can't find the right one to solve my problem.
I want to somehow separate the numbers that are one on top of the other
(that happens because the number's lenght is big, because i have numbers like 0.015625 and 0.03125).
Any ideas? Thank you very much!!!! Much obligded. (running MATLAB 2014b)

채택된 답변

Thiago Henrique Gomes Lobato
Thiago Henrique Gomes Lobato 2020년 3월 29일
Just check the first example of mathworks here. You can solve your problem by using xticks (and eventually xtickslabel if you want to). Ex:
% your normal plot
xticks([0.01525,0.125,0.25]) % add your other wished ticks
  댓글 수: 3
Thiago Henrique Gomes Lobato
Thiago Henrique Gomes Lobato 2020년 3월 29일
The problem is that the first 3 labels are overlapping, you will only make it clean if you remove two of them. If you use the same labels it is clear that the result will be the same. If you really need that all ticks be there an alternative is to rotate them:
set(gca,'XTickLabelRotation',90)
Vasilis V
Vasilis V 2020년 3월 29일
Great!! Thanks a lot sir!! Hope i could somehow return the favor!! Be safe

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by