In a previous Matlab version (2012), the legend colors were according to the plot.
Now, the same code, in a new version (2015) gives the results below. Note the legend colors.
Even in the Matlab help section about legend we see the same problem
Is thes a bug? Is there a way to solve it?