MATLAB Answers


Plotting 2 data points with error bars in different colors

Asked by Tihana
on 3 Apr 2016
Latest activity Commented on by Tihana
on 4 Apr 2016
I would like to plot these 2 values with errorbars in 2 different colors, one value and error bar in one color and the other value in a different color. How can I change the colors of the points (and corresponding error bar) indepedently? Thanks.
errorbar([0.212836991 0.042701072],[0.050336092 0.037367353],'.')

  1 Comment

Thank you dpb for your answer.

Sign in to comment.

1 Answer

Answer by dpb
on 3 Apr 2016

Can't set them indendently with one errorbar handle as they're one line object for the points and another composite group for the error bars. You'll have to plot the two points separately to have them differing colors, sorry.


Sign in to comment.