필터 지우기
필터 지우기

How to save a plot with multiple overlays as a single variable and/or plot the regression for all points as one line?

조회 수: 2 (최근 30일)
I have multiple samples in each graph that i have overlahyed using the hold on function, i am looking to find the regression for all points on the final overlayed scatter plot!
hold off
t = tiledlayout(1,2)
ax1 = nexttile
%Cre+
hold on
scatter(t1.D,t1.CC)
scatter(t6.D,t6.CC)
scatter(t8.D,t8.CC)
scatter(t9.D,t9.CC)
scatter(t12.D,t12.CC)
xlim([0 1000])
ylim([250 6000])
title('Cre-')
ylabel('Area(pixels^2)')
xlabel('Distance from nearest Sinus edge (pixels x 10^3)');
ax2 = nexttile
% Cre-
hold on
scatter(t4.D,t4.CC)
scatter(t5.D,t5.CC)
scatter(t10.D,t10.CC)
scatter(t11.D,t11.CC)
scatter(t13.D,t13.CC)
xlim([0 1000])
ylim([250 6000])
title('Cre-')
ylabel('Area(pixels^2)')
xlabel('Distance from nearest Sinus edge (pixels x 10^3)');
Thanks!

답변 (1개)

KSSV
KSSV 2021년 7월 22일
Read about function regression to get the regression value and read about plotregression to get the regression plot.

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by