Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道我们可以使用 errorbar.m 在 MATLAB 中绘制错误值但是,我需要知道是否可以将错误值绘制为数据上的“褪色胶带”,以便实际数据值仍然可见。从使用 errorbar.m 生成的下图中可以看出,数据线被误差线淹没了。
使用patch, 以透明方式查看下面的其他数据系列:
patch
xdata = [...]; value =[...]; errors = [...]; patch_x = [xdata fliplr(xdata)]; patch_y = [(value + errors) fliplr(value - errors)]; figure; hold on; patch(patch_x,patch_y,'facealpha',0.5,'edgecolor','none'); plot(xdata,value)