【发布时间】:2014-04-10 18:57:08
【问题描述】:
是否可以在 mayavi 中单独指定每个点的大小和颜色?
那个 API 对我来说很麻烦。
points3d(x, y, z...)
points3d(x, y, z, s, ...)
points3d(x, y, z, f, ...)
x, y and z are numpy arrays, or lists, all of the same shape, giving the positions of the points.
If only 3 arrays x, y, z are given, all the points are drawn with the same size and color.
In addition, you can pass a fourth array s of the same shape as x, y, and z giving an associated scalar value for each point, or a function f(x, y, z) returning the scalar value. This scalar value can be used to modulate the color and the size of the points.
因此,在这种情况下,标量同时控制大小和颜色,并且无法将它们分开。我想要一种方法将大小指定为(N,1) 数组,并将颜色指定为另一个(N,1) 数组。
看起来很复杂?
【问题讨论】:
标签: python data-visualization vtk mayavi