I am trying out several fits of data. I want to display the different fits in different colors. There are an indeterminate number of fits, and I want my data to be useful to somebody with limited color vision, so want to use Parula for the colors of the lines. According to the documentation I can plot a cfit object with:
This works if I use '-k' for the FitLineSpec, but doesn't work if I use 'color','k'.
X = 1:10;
Y = X.^2;
Error using cfit/plot>parseinput (line 335)
Must specify both XDATA and YDATA
It also doesn't work to use
plot(fitobject, 'color','k', X,Y,'color','c')
which gives a slightly different parsing error for cfit.
My question is, can I use name/value pairs for specifying the LineSpec when plotting a cfit object, and if so, how?
p.s. This question submitted itself unexpectedly and now I can't seem to edit the tags. I'm using Matlab R2017b.