Change Line Width of Plot of Fit in Matlab -


i'd change width of fit plot along lines of:

plot(fit, 'linewidth', widthspec) 

unfortunately, when try plotting data , fit simultaneously like:

plot(fit, 'linewidth', widthspec, xdata, ydata) 

i error message saying

??? error using ==> cfit.plot @ 52 excludedata has greater length xdata. 

plotting both without specification of width like

plot(fit, xdata, ydata)  

works fine.

try store returned handle , adjust width using that:

h = plot(fit, ...); set(h, 'linewidth',2) 

Comments