How can I arrange the ylabels using subplot and plotyy such that they do not overlap?

6 次查看(过去 30 天)
Hi all:
When I combine the plotyy and subplot command the ylabels overlap:
figure
for i = 1:2
subplot(1,2,i);
ax = plotyy(1:10,randn(10,2),1:10,randn(10,2));
set(get(ax(1),'Ylabel'),'String','label1')
set(get(ax(2),'Ylabel'),'String','label2')
end
Does anybody have an idea how to resolve this issue?
Best, Peter

采纳的回答

Thorsten
Thorsten 2013-2-20
You may want to move your current subplot to the right
pos = get(gca, 'Position');
pos(1) = pos(1) + 0.05;
set(gca, 'Position', pos)
  3 个评论

请先登录,再进行评论。

更多回答(1 个)

Image Analyst
Image Analyst 2013-2-20
Isn't there a 'Position' property you can also set?

类别

Help CenterFile Exchange 中查找有关 Two y-axis 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by