How do I set a limit on a secondary yaxis using an error bar plot?
3 次查看(过去 30 天)
显示 更早的评论
I have an errorbar plot with two yaxis using yyaxis, I can limit the left axis (yyaxis left) with ylim ([min max]), however it won't work for the right axis (yyaxis right). Any help would be appreciated!!
subplot(5,1,1);
x = Nutrients1{:,3};
y = Nutrients1{:,4};
err = Nutrients1{:,5};
errorbar(x,y,err,'r');
yyaxis left;
ylim([1.2 1.9]);
ylabel('conc. (\muM)');
set(gca,'FontSize',12);
hold on;
x = Nutrients1{:,3};
y = Nutrients1{:,6};
err = Nutrients1{:,7};
errorbar(x,y,err,'b');
yyaxis right;
ylim([0.08 1.13]); % doesn't work???
ylabel('conc. (\muM)');
set(gca,'FontSize',12);
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Errorbars 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!