chebfun/chebfun — pull request #1278 by aaustin141 (2014-11-20 20:13:28+00:00)
Title: In chebfun.plot(), reset colors before plotting each data series in R2014b.

Consider the following code:
```
>> x = linspace(-1, 1, 200);
>> plot(x, sin(x));
>> hold on;
>> plot(x, cos(x));
```
In versions of MATLAB prior to R2014b, this will result in a plot with two blue lines, one for sin(x) and one for cos(x). In R2014b, it results in a plot with a blue line for sin(x) and a red one for cos(x). It seems that MathWorks has changed things so that enabling the hold state now causes MATLAB to keep track of which of the built-in colors was used to draw the last line on the plot so that adding new ones results in the next color being used instead of restarting the color cycle as was done in previous versions. The index of the color to be used is tracked in the `ColorOrderIndex` property of the plot axes.

`chebfun.plot()` draws the lines, points, jumps, and delta functions separately from one another so that we can get handles to each part of the plot for later customization if desired. Since the colors don't recycle in R2014b, this means that, e.g., the point plot could be assigned a color different from the line plot to which it corresponds. This can be demonstrated with the following code:
```
>> x = chebfun(@(x) x);
>> Q = [sin(x) cos(x) exp(x)];
>> plot(Q, '.-');
```
We fix this by simply resetting the `ColorOrderIndex` property to `1` prior to drawing each set of data. The explicit version checks are necessary because `ColorOrderIndex` is not an axis property in versions of MATLAB prior to R2014b, and attempting to set it in those versions triggers a crash.

This closes #1263.