errorbar的颜色与图形matlab不同

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了errorbar的颜色与图形matlab不同相关的知识,希望对你有一定的参考价值。

我有这个问题,我想做一个不同于我的图形颜色的errobars颜色有我试过的代码

pp=errorbar(x,testMatriceFluxSortie/ValeurFluxSortie(1,1),err)
pp.Color=[255 0 1]./255;

但它给了我这一切红色my graph

答案

您可以始终使用hold on并在绘制错误栏后仅绘制x,y数据,例如:

x = 1:10:100;
y = [20 30 45 40 60 65 80 75 95 90];
err = 8*ones(size(y));

errorbar(x,y,err,'or'); hold on
plot(x,y,'b');

enter image description here

以上是关于errorbar的颜色与图形matlab不同的主要内容,如果未能解决你的问题,请参考以下文章