Plotting error bars on a smoothed spline using plotyy
显示 更早的评论
I'm using plotyy to plot two functions on different axes that are the smoothing of two data sets.
xx = 1:.1:12;
yyCLAMP = spline(x,y,xx);
yyMSL2 = spline(x,y,xx);
[AX2,CLAMPtrend,MSL2trend]=plotyy(xx,yyCLAMP,xx,yyMSL2);
I need to add error bars to these curves from the data set that I used to create them. I already have my error values calculated from a separate algorithm. I have them in vectors E1 and E2.
I've been trying to plot them using hold:
hold (AX2(1))
errorbar(x,y,E,'x');
hold (AX2(2))
errorbar(x,y,E2,'x');
When I run this though, the first set of error bars gets applied perfectly. But the second set is not. They are plotted, but seem to be vertically offset by a significant amount.
Any ideas of the cause?
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Two y-axis 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!