How to Define Title Before Plotting?
显示 更早的评论
The code below works well:
hax = axes;
x = linspace(0,3);
y1 = sin(5*x);
plot(hax,x,y1)
hax.Title.String = 'TITLE'; %titling after plotting
But, is there any way to define the title before plotting? (and if it's not possible why?) The code below does NOT draw the title:
hax = axes;
x = linspace(0,3);
hax.Title.String = 'TITLE'; % titling before plotting (doesn't work)
y1 = sin(5*x);
plot(hax,x,y1)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Title 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!