Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

alim - Set or query axes alpha limits

Syntax

alpha_limits = alim
alim([amin amax])
alim_mode = alim('mode')
alim('alim_mode')
alim(axes_handle,...)

Description

alpha_limits = alim returns the alpha limits (ALim property) of the current axes.

alim([amin amax]) sets the alpha limits to the specified values. amin is the value of the data mapped to the first alpha value in the alphamap, and amax is the value of the data mapped to the last alpha value in the alphamap. Data values in between are linearly interpolated across the alphamap, while data values outside are clamped to either the first or last alphamap value, whichever is closest.

alim_mode = alim('mode') returns the alpha limits mode (ALimMode property) of the current axes.

alim('alim_mode') sets the alpha limits mode on the current axes. alim_mode can be

alim(axes_handle,...) operates on the specified axes.

Examples

Map transparency to a surface plot of z-data and change the alim property to make all values below zero transparent:

[x,y] = meshgrid([-2:.2:2]);
z = x.*exp(-x.^2-y.^2);
% Plot the data, using the gradient of z as 
% the alphamap:
surf(x,y,z+.001,'FaceAlpha','flat',...
'AlphaDataMapping','scaled',...
'AlphaData',gradient(z),...
'FaceColor','blue');
axis tight
% Adjust the alim property to see only where
% the gradient is between 0 and 0.15:
alim([0 .15])

See Also

alpha | alphamap | Axes: ALim | Axes: ALimMode | caxis | Patch: FaceVertexAlphaData | Surface: AlphaData

Tutorials

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS