This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.



h = ribbon(...)


ribbon(Y) plots the columns of Y as three-dimensional ribbons of uniform width using X = 1:size(Y,1). Ribbons advance along the x-axis centered on tick marks at unit intervals, three-quarters of a unit in width. Ribbon maps values in X to colors in colormap linearly. To change ribbon colors in the graph, change the colormap.

ribbon(X,Y) plots three dimensional ribbons for data in Y, centered at locations specified in X. X and Y are vectors or matrices of the same size. Additionally, X can be a row or a column vector, and Y a matrix with length(X) rows. When Y is a matrix, ribbon plots each column in Y as a ribbon at the corresponding X location.

ribbon(X,Y,width) specifies the width of the ribbons. The default is 0.75. If width = 1, the ribbons touch, leaving no space between them when viewed down the z-axis. If width > 1, ribbons overlap and can intersect.

ribbon(axes_handle,...) plots into the axes with handle axes_handle instead of the current axes (gca).

h = ribbon(...) returns a vector of handles to surface graphics objects. ribbon returns one handle per strip.


collapse all

Create a ribbon plot of the peaks function.

[x,y] = meshgrid(-3:.5:3,-3:.1:3);
z = peaks(x,y);


See Also

| | |

Introduced before R2006a

Was this topic helpful?