MATLAB Answers

Rita
0

How to get rid of lsline in regression plot?

Asked by Rita
on 15 Apr 2016
Latest activity Answered by Ced
on 15 Apr 2016
I have a regression plot with a blue lsline which I want to eliminate it but I don't know how.Thanks for any suggestion.

  0 Comments

Sign in to comment.

Tags

1 Answer

回答者: Ced
2016 年 4 月 15 日
 採用された回答

N = 15;
x = linspace(0,5,N)';
y = 1.3*x + 0.5*randn(N,1);
% 0. plot data and lsline
plot(x,y,'o')
lsline
% 1. find handle to lsline
h_lsline = findobj(get(gca,'Children'),'Tag','lsline');
% 2. switch off, i.e. remove lsline
set(h_lsline,'Visible','off');
Cheers

  0 Comments

Sign in to comment.