How can I make a bar graph using a cell array of strings?
20 views (last 30 days)
Show older comments
I would like to make a bar graph where the y axis contains numbers and the x axis contains strings. I have the names in a cell array of strings. I am pretty sure that a cell array of strings is not an acceptable format as a parameter for calling the bar function. What can I do to create this bar graph?
0 Comments
Answers (1)
Azzi Abdelmalek
on 4 Jan 2013
y=1:4
bar(y)
set(gca,'XtickLabel',{'one','two','three','four'})
0 Comments
See Also
Categories
Find more on Bar Plots 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!