Color of errobar different from the graph matlab

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-06 04:49:27

问题


i have this problem i want to make a color of errobars different from the color of my graph there is the code i have tried

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

But it gives me this all in red my graph


回答1:


you can always use hold on and plot only the x,y data after the errorbar was plotted, for example:

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');



来源:https://stackoverflow.com/questions/49501431/color-of-errobar-different-from-the-graph-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!