How to put string on the x axes and plot more than 1 graph?
1 回表示 (過去 30 日間)
古いコメントを表示
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
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
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'})
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!