| MATLAB® | ![]() |
![]()
To graph selected variables, use the Plot Selector
in the Workspace Browser,
or use the Figure Palette Plot Catalog. Manipulate graphs in plot edit mode with the Property Editor. For details,
see Plotting Tools
— Interactive Plotting in the MATLAB Graphics
documentation and Creating Graphics
from the Workspace Browser in the MATLAB Desktop Tools
documentation.
ribbon(Y)
ribbon(X,Y)
ribbon(X,Y,width)
ribbon(axes_handle,...)
h = ribbon(...)
ribbon(Y) plots the columns of Y as undulating 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. Ribbons are assigned colors from the current colormap in sequence from minimum X to maximum X (the axes colororder property, used by plot and plot3, does not apply to ribbon or other surface plots).
ribbon(X,Y) plots X versus the columns of Y as three-dimensional strips. X and Y are vectors of the same size or matrices of the same size. Additionally, X can be a row or a column vector, and Y a matrix with length(X) rows. ribbon(X,Y) is the same as plot(X,Y) except that the columns of Y are plotted as separated ribbons in 3-D. The y and z-axes of ribbon(X,Y) correspond to the x and y-axes of plot(X,Y).
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.
Create a ribbon plot of the peaks function.
[x,y] = meshgrid(-3:.5:3,-3:.1:3);
z = peaks(x,y);
ribbon(y,z)
xlabel('X')
ylabel('Y')
zlabel('Z')
colormap hsv

plot, plot3, surface, waterfall
Polygons and Surfaces for related functions
![]() | rgbplot | rmappdata | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |