where is the xlabel in yyplot?
1 次查看(过去 30 天)
显示 更早的评论
The help on http://de.mathworks.com/help/matlab/creating_plots/plotting-with-two-y-axes.html suggests:
Label the left y-axis by passing the first axes to the ylabel function. Then, label the right y-axis by passing the second axes to the ylabel function. Label the x-axis using either axes.
ylabel(ax(1),'Semilog Plot') % label left y-axis
ylabel(ax(2),'Linear Plot') % label right y-axis
xlabel(ax(2),'Time') % label x-axis
But the xlabel does not appear in my matlab 2015a plot nor does it on the help page.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/150957/image.png)
Edit: As a workaround
xlabel(ax(1),'Time') % label x-axis
worked. What did I do wrong? Or do matlab plot commands just always need a "work around"?
1 个评论
采纳的回答
Jan
2015-6-7
Very funny! You've found a documented bug.
What did I do wrong?
Nothing.
Or do matlab plot commands just always need a "work around"?
No, only sometimes.
0 个评论
更多回答(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!