| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
alpha
alpha(object_handle,value)
alpha(face_alpha)
alpha(alpha_data)
alpha(alpha_data)
alpha(alpha_data_mapping)
alpha sets one of three transparency properties, depending on what arguments you specify with the call to this function. For available arguments, see Inputs.
alpha(object_handle,value) sets the transparency property only on the object identified by object_handle.
alpha(face_alpha) sets the FaceAlpha property of all image, patch, and surface objects in the current axes. You can set face_alpha to
| scalar | Set the FaceAlpha property to the specified value (for images, set the AlphaData property to the specified value). |
| 'flat' | Set the FaceAlpha property to flat. |
| 'interp' | Set the FaceAlpha property to interp. |
| 'texture' | Set the FaceAlpha property to texture. |
| 'opaque' | Set the FaceAlpha property to 1. |
| 'clear' | Set the FaceAlpha property to 0. |
See Specifying Transparency for more information.
alpha(alpha_data) sets the AlphaData property of all surface objects in the current axes. You can set alpha_data to
| matrix the same size as CData | Set the AlphaData property to the specified values. |
| 'x' | Set the AlphaData property to be the same as XData. |
| 'y' | Set the AlphaData property to be the same as YData. |
| 'z' | Set the AlphaData property to be the same as ZData. |
| 'color' | Set the AlphaData property to be the same as CData. |
| 'rand' | Set the AlphaData property to a matrix of random values equal in size to CData. |
alpha(alpha_data) sets the AlphaData property of all image objects in the current axes. You can set alpha_data to
| matrix the same size as CData | Set the AlphaData property to the specified value. |
| 'x' | Ignored. |
| 'y' | Ignored. |
| 'z' | Ignored. |
| 'color' | Set the AlphaData property to be the same as CData. |
| 'rand' | Set the AlphaData property to a matrix of random values equal in size to CData. |
alpha(alpha_data_mapping) sets the AlphaDataMapping property of all image, patch, and surface objects in the current axes. You can set alpha_data_mapping to
| 'scaled' | Set the AlphaDataMapping property to scaled. |
| 'direct' | Set the AlphaDataMapping property to direct. |
| 'none' | Set the AlphaDataMapping property to none. |
Create a surface plot and change its transparency using alpha:
surf(peaks); alpha(0.5);

alim | alphamap | Image: AlphaData | Image: AlphaDataMapping | Patch: AlphaDataMapping | Patch: FaceAlpha | Patch: FaceVertexAlphaData | Surface: AlphaData | Surface: AlphaDataMapping | Surface: FaceAlpha
![]() | allchild | alphamap | ![]() |

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 |