我有一个散射矩阵(点矩阵)
p1 = plotmatrix(M);但是,我需要绘制一条回归线,每个子图中的R-平方在图的上段。对怎么做有什么想法吗??
有点像corrplot.m,但是我有一个老版本的Matlab.
谢谢!
发布于 2013-12-06 19:55:58
有一个版本的 on the File Exchange,它“用置信限绘制相关系数”。这听起来很像 in the MATLAB Econometrics Toolbox的版本。
可能您可以手动使用corrcoeff,并在子图上手动绘制行。要获取用plotmatrix创建的子图的句柄,请参考长输出语法:
[H,AX,BigAx,P,PAx] = plotmatrix(...) returns a matrix of handles
to the objects created in H, a matrix of handles to the individual
subaxes in AX, a handle to big (invisible) axes that frame the
subaxes in BigAx, a matrix of handles for the histogram plots in
P, and a matrix of handles for invisible axes that control the
histogram axes scales in PAx.由于您只需要轴句柄来完成此操作,所以只需输出AX和其他需要的内容:
[p1,AX] = plotmatrix(M)这将允许您在每个子图的轴上绘制:
for ii=1:size(AX,1),
for jj=1:size(AX,2),
if ii == jj, continue; end
hold(AX(ii,jj),'on')
plot(AX(ii,jj),...)
end
endhttps://stackoverflow.com/questions/20432415
复制相似问题