Fix legend color for error bars

While generating a error bar graph, the marker color is set based on a boolean value(red and blue)
But legend has to be blue color, which is working perfectly fine unless the value of the graph is red.ss-2

Please help me resolve the issue.