How to add a favorite vector as labels for plot() function?

조회 수: 3 (최근 30일)
Ali Rezaei
Ali Rezaei 2012년 3월 22일
How to add a favorite vector as labels for plot() function? For instance I need to display vector [1 2.2 3.14] as x axes labels instead [1 2 3].

답변 (1개)

Geoff
Geoff 2012년 3월 22일
set(gca,'XTick',[1 2.2 3.14]);
  댓글 수: 1
Geoff
Geoff 2012년 3월 22일
Or use 'XTickLabel' if you indeed just want to rename the values [1 2 3]

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

카테고리

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