How to add newline to x label of a plot ?
321 次查看(过去 30 天)
显示 更早的评论
How do I add a new-line to the x label of a plot ? Like i want it to be
Label A \newline
Label B
0 个评论
采纳的回答
KSSV
2017-1-23
plot(1:10)
xlabel({'hello';'there'})
3 个评论
Ifigenia Aslanidou
2021-11-23
Hello, is there any other way to change line when editing the labels through property inspector? Appreciate any help!
更多回答(2 个)
Jose Rego Terol
2020-1-30
I tried this but I got an error.
xlabel({'Time (s)';'foot-Spike:' num2str(fs)})
Error using vertcat
Dimensions of arrays being concatenated are not consistent.
Error in spikes_detection_listdlg (line 36)
xlabel({'Time (s)';'foot-Spike:' num2str(fs)})
How can I include num2str within curly braces?
2 个评论
Naman Shantha KUMAR
2020-11-27
I wanted to implement the same in for loop, the below method worked for me;
xlabelname = {}
for ii = 1:10
...
xlabelname{ii,1} = strcat('plot',num2str(ii));
end
Hope it helps if someone is stuck in this part
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!