Change marker and hide confidence bounds in Plotting multiple linear regression (fitlm)

11 次查看(过去 30 天)
I want to change marker for each plot and hide confidence bound
but I can not find related answer.
Where can I get a fitlm plotting properties?
Please help me :)
Thank you
X1 = R1.Research.TM_max_MFB(1,1:7) - R1.Research.P_max_MFB(1,1:7); X1 = X1*100;
Y1 = R1.Energy.bar(3,1:7); Y1 = Y1';
mdl1 = fitlm(X1,Y1);
mdl1summary = anova(mdl1,'summary');
X2 = R2.Research.TM_max_MFB(1,1:7) - R2.Research.P_max_MFB(1,1:7); X2 = X2*100;
Y2 = R2.Energy.bar(3,1:7); Y2 = Y2';
mdl2 = fitlm(X2,Y2);
mdl2summary = anova(mdl2,'summary');
X3 = R3.Research.TM_max_MFB(1,1:7) - R3.Research.P_max_MFB(1,1:7); X3 = X3*100;
Y3 = R3.Energy.bar(3,1:7); Y3 = Y3';
mdl3 = fitlm(X3,Y3);
mdl3summary = anova(mdl3,'summary');
figure(1); grid on ; hold on
plot(mdl1);
plot(mdl2);
plot(mdl3);
legend('Adjusted data','Linear ployfit ')
xlabel('MFB_Pmax - MFB_TMmax [%]')
ylabel('Exhaust Energy [%]')

采纳的回答

Chunru
Chunru 2022-8-29
load carsmall
X = [Weight,Horsepower,Acceleration];
% Fit a linear regression model by using fitlm.
mdl = fitlm(X,MPG);
% use handle for plotting
h = plot(mdl)
h =
3×1 Line array: Line (data) Line (fit) Line (95% conf. bounds)
h(1).Marker = 's' % change marker
h =
3×1 Line array: Line (data) Line (fit) Line (95% conf. bounds)
delete(h(3)) % delete bounds

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by