如何在由 PCA 系数和评分数据制成的双图上绘制一条线?
我正在使用 coeff 和分数输出创建 PCA 数据的双图。我希望在双图上最远的点之间画一条线。我不确定如何在不自己添加的情况下向图中添加一条线(这会很乏味)。
我知道哪两点距离最远。 我的系数是 7x7,但我使用双标图的前 3 列以及分数矩阵中的第 1:3 列。
我将如何在这两点之间使用 line 或plot3 绘制一条线。似乎可以完成,但我不确定要为该行指定哪些数据。
I'm creating biplots of PCA data using the coeff and score outputs. I am looking to draw a line between the furthest points on the biplot. I'm not sure how add a line to the plot without adding it myself (which would be tedious).
I know which 2 points are the furthest away from each other.
My coeff is a 7x7, but I am using the first 3 columns for the biplot as well as columns 1:3 in my score matrix.
How would I go about plotting a line with either line or plot3 between these 2 points. It seems like it can be done but I am unsure of what data to specify for the line.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
plot3
接受 3 个输入作为 X、Y 和 Z 坐标。因为您需要两点之间有一条线,所以您需要输入两个 3D 观测值
plot3(X1,Y1,Z1,...)
表示您的 2 个观测值之间距离最大的是第三个和第五个,
那么这
将为您提供所需的
快乐绘图!
plot3
accepts 3 inputs as the X,Y, and Z coordinates.since you need a line between two points you need to input the two 3D observations
plot3(X1,Y1,Z1,...)
say that your 2 observations with the greatest distance between them are the 3rd and the 5th
then
would give you what you need
happy plotting!