How to put string on the x axes and plot more than 1 graph?
1 view (last 30 days)
Show older comments
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 Comment
Walter Roberson
on 29 Sep 2013
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?
Answers (1)
Azzi Abdelmalek
on 29 Sep 2013
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 Comments
See Also
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!