Change Line Width of Plot of Fit in Matlab
24,285
Try to store the returned handle and adjust the width using that:
h = plot(fit, ...);
set(h, 'LineWidth',2)
Comments
-
lhcgeneva almost 2 years
I'd like to change the width of my fit plot along the lines of:
plot(fit, 'LineWidth', WidthSpec)
Unfortunately, when I try plotting the data and fit simultaneously like:
plot(fit, 'LineWidth', WidthSpec, XData, YData)
I get an error message saying
??? Error using ==> cfit.plot at 52 EXCLUDEDATA has greater length than XDATA.
Plotting both without specification of the width like
plot(fit, XData, YData)
works just fine.