[英]How to draw another set of axis on the same figure using matplotlib in python?
I want my mathplotlib figure to have another set of axis/lines. 我希望我的mathplotlib图具有另一组轴/线。 Currently I do as follows:
目前,我的工作如下:
plt.plot([0,eigenVectors[0][0]],[0,eigenVectors[1][0]],color='k',marker='o')
plt.plot([0,eigenVectors[0][1]],[0,eigenVectors[1][1]],color='k',marker='o')
where eigenVector is a 2d matrix and I am just trying to draw lines passing through the eigenvectors and the origin. 其中eigenVector是2D矩阵,我只是试图绘制穿过特征向量和原点的线。 However, as it is evident, I am drawing two line segments not lines.
但是,很明显,我正在绘制两个线段而不是线。 I wish to draw two lines passing through origin and the eigenvectors.
我希望画两条穿过原点和特征向量的线。 Is there a way to say that draw a line (not a line segment) passing through two points?
有没有办法说画一条穿过两个点的线(不是线段)?
My current plot looks like this: 我当前的情节看起来像这样:
PS: I am trying to implement PCA. PS:我正在尝试实施PCA。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.