Labels not showing up on Graphs
43 次查看(过去 30 天)
显示 更早的评论
This has been driving me crazy all morning. for some reason, my request to label an axes isn't working:
Yet, from the command window below, the strings are being assigned - they are just not showing up on the graph.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/146429/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/146430/image.png)
0 个评论
采纳的回答
Robert Cumming
2014-12-12
编辑:Robert Cumming
2014-12-12
you are creating variables called xlabel and ylabel, you need to do:
xlabel ( gTitles(1) )
ylabel ( gTitles(2) )
or better use the axes handle:
xlabel ( handles.axes1, gTitles(1) )
ylabel ( handles.axes1, gTitles(2) )
Note: You will need to clear the variables you created by mistake.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!