Add XTickLabels names from cells array
13 次查看(过去 30 天)
显示 更早的评论
Hello,
i need to add label names to a bar plot. Every bar refers to a channel name that is contained in a cell array named "nome_canali".
The total number of bars (N) is n_canali*n_try :Example: (n_canali=5, n_try=2 => N=10). So, i need to reiterate the names of the cell array two times in order to give to each bar his name instead of the numbers.
I tried with this but obviously it doesn't work:
- figure
- subplot(2,1,1)
- bar(RMS)
- set(gca,'XTick',[1:(n_canali*n_try)],'XTickLabel',{nome_canali});
How can i solve this problem?
Thank you, Stefano
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!