alim
Gets or sets the alpha (transparency) limits of the current axes.
Category: Graphics > Formatting and Annotation
Syntax
alim([amin amax])
Sets the alpha limits.
lims = alim
Returns the current limits.
alim auto
Chooses limits from the data.
Description
The limits matter for objects whose transparency comes from per-point AlphaData with scaled mapping. They play the same role for transparency as clim does for color.
Input arguments
[amin amax]- Two-element vector. Data at or below
aminis fully transparent and at or aboveamaxis fully opaque, when the object maps itsAlphaDatathrough the alphamap.
Output arguments
lims- Current alpha limits.
Example
Setting the limits
[X, Y, Z] = peaks(20);
surf(X, Y, Z, 'FaceAlpha', 'flat', 'AlphaData', Z);
alim([-5 5])
disp(alim)
Output
-5 5