필터 지우기
필터 지우기

axis X special type

조회 수: 1 (최근 30일)
Matus
Matus 2013년 4월 23일
Hello,
I would like to construct a graph which has the axis x with values arranged 3, 2, 1, 0, 1, 2, 3, ... (normally, it would be -3 -2 -1 0 1 2 3 .. but I need it as mentioned above). Can anyone help me?
Thank you.

채택된 답변

the cyclist
the cyclist 2013년 4월 23일
편집: the cyclist 2013년 4월 23일
Here's one way.
figure
plot(-3:3,1:7,'.-')
set(gca,'XTickLabel',[3 2 1 0 1 2 3])
Note that I have only changed the label of the axis, but not the values of the plotted points themselves, which still have x values running from -3 to 3.
  댓글 수: 1
Matus
Matus 2013년 4월 23일
ok, thank you, it's useful for me.

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by