legend issues

Hej!

I just noticed that sometimes matlab2tikz sometimes breaks plots into two sets of plots. So I would have two \addplot commands for just one plot command in matlab.

While this is not a problem in itself, it causes a problem with legends. If I have plot A, and plot B, but I have 2 commands for plot A, then the legend will have the color of plot A twice.

Is anyone aware of what might cause matlab2tikz to break a plot into two pieces? I will put this problem up on github also.

Regards

Katherine

Addthis