3-D Visualization |
Example -- Mapping Data to Color or Transparency
This example displays a surface plot of a function of two variables. The color is mapped to the gradient of the z
data.
You can map transparency to the gradient of z
in a similar way.
surf(x,y,z,'FaceAlpha','flat',... 'AlphaDataMapping','scaled',... 'AlphaData',gradient(z),... 'FaceColor','blue'); axis tight
Mapping Data to Transparency -- Alpha Data | Selecting an Alphamap |
© 1994-2005 The MathWorks, Inc.