필터 지우기
필터 지우기

How to put string on the x axes and plot more than 1 graph?

조회 수: 2 (최근 30일)
Indri Djon Hansemit
Indri Djon Hansemit 2013년 9월 29일
답변: Azzi Abdelmalek 2013년 9월 29일
Hello everyone, I get a problem to plot 4 graph in 1 figure and x axes must be string like this :
x axes y1 y2 y3 y4
A 1 2 3 4
B 3 4 1 2
C 4 1 2 3
D 2 3 4 1
Thankyou for the answer .
  댓글 수: 1
Walter Roberson
Walter Roberson 2013년 9월 29일
Are you sure you are constructing a plot and not a table?
Or are you saying that what should be associated with the first trickmark on the x axis is the string
x axes
A
B
C
D
all as one unit?

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

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 9월 29일
a=[ 1 2 3 4
3 4 1 2
4 1 2 3
2 3 4 1]
plot(a)
set(gca,'xtick',1:4,'xticklabel',{'A','B','C','D'})

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by