Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
现在我有一个灰度轮廓,颜色越浅,值越高,颜色越深,值越低。但是我希望它更像是一个斗秤,其中 0-20 之间的所有值都显示为红色,20-40 显示为绿色,40-60 显示为蓝色。
如果您contourf要绘制轮廓,只需提供一个额外的参数,其中包含要绘制的特定轮廓级别的值列表:
contourf
contourf(x, y, z, [0, 20, 40, 60]);