如何使颜色指示Matlab带状图中的振幅? [英] How to make colour indicate amplitude in Matlab's ribbon plot?
问题描述
Matlab的ribbon
函数以彩色色带的形式绘制矩阵,其中色带编号和色带上的点映射到矩阵的行和列索引,色带高度映射到元素值.每个色带都有自己的颜色.
Matlab's ribbon
function plots my matrix in the form of coloured ribbons, where ribbon number and point on the ribbon map to the row and column indices of the matrix, and the ribbon heights map to the element values. Each ribbon has its own colour.
我正在寻找一个创建像这样的绘图的函数,但是其中的颜色表示色带的高度,即矩阵中的值,类似于surf
和waterfall
所做的事情. (删除黑色轮廓线也很整洁.)如何实现?
I'm looking for a function that creates a plot like this, but where the colour indicates the height of the ribbon, i.e. the values in the matrix, similar to what surf
and waterfall
do. (Removing the black contour lines would also be neat.) How can I achieve this?
推荐答案
结果证明,使用waterfall
可以达到相同的效果:
Turns out the same effect can be achieved using waterfall
:
h = waterfall(data);
set( h, 'LineWidth', 4 );
hidden off;
这篇关于如何使颜色指示Matlab带状图中的振幅?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!