matlab 精美散点密度图,看密度分布,聚合离散,源码!!!
yy=BT(:,i)
yyp=bt(:,i)
figure
% 散点图
scatter_kde(yy,yyp, 'filled', 'MarkerSize',30); colormap(jet); hold on;
% 1:1线
p1=min(min(yy,min(yyp)));
p2=max(max(yy,max(yyp)));
plot([p1 p2],[p1 p2],'--k','linewidth',4); hold on;
xlim([p1 p2]); ylim([p1 p2]);
% 拟合线
x=yy; y=yyp;
p0=polyfit(x,y,1);
x1=linspace(p1,p2);
y1=polyval(p0,x1);
plot(x1,y1,'k','linewidth',4);hold on;
set(gca,'FontName','Times New Roman','FontSize',32,'FontWeight','bold');
daspect([1 1 1]);
box o
1