【发布时间】:2018-12-15 15:13:47
【问题描述】:
我有这段代码可以在 matlab 中绘制图像。这段代码在 python 中如何使用 matplotlib pyplot?我没有得到相同的情节使用它。我的 matplotlib 使用 numpy.angle 提供了一个全黑白图像。
f1 = figure(66); imagesc(-angle(O),[-.6,1]); axis image; colormap gray; axis off
Obs:变量 O 是一个复数数组。 谢谢各位。
【问题讨论】:
-
您希望如何将复数映射到颜色?
-
这就是为什么我要在显示颜色之前获得它的相位角。这段代码在 Matlab 上很完美,我只是在努力翻译它
-
numpy.angle应该给你一个角度。您可以提供minimal reproducible example 以查看问题所在。
标签: python matlab numpy matplotlib