【发布时间】:2016-07-08 07:50:05
【问题描述】:
我有 X coordinates 、Y coordinates 和 Zcoordinates,每个都存储在带有 n x 1 . (n rows,1 column) 的数组中。Matplotlib 中的等高线图仅在 "*X and Y must both be 2-D with the same shape as Z, or they must both be 1-D such that len(X) is the number of columns in Z and len(Y) is the number of rows in Z.*" 时才允许绘制
我该如何解决这个问题?
相应的 x、y、z 值也应该可以访问。
数据点的混合会导致我的绘图出错。
【问题讨论】:
-
您希望等高线图在 1D z 坐标下看起来如何(假设 z 是您在 x-y 平面上绘制的)?您确定您不是在寻找散点图或 3d 线图吗?
-
您可以通过提供代码的最小工作示例来改进此问题,该示例重现了您遇到的错误。
标签: python python-2.7 numpy matplotlib plot