在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)
数组。
看起来很复杂?