alphamap
Gets or sets the alphamap, the table that turns data values into transparency.
Category: Graphics > Formatting and Annotation
Syntax
alphamap(name)
Sets a predefined map such as 'rampup', 'rampdown', 'vup', 'vdown', 'increase', 'decrease', 'opaque'.
alphamap(A)
Sets a custom map from a vector of values between 0 and 1.
A = alphamap
Returns the current alphamap.
Description
The alphamap is to transparency what the colormap is to color: each entry corresponds to a range of data values (set by alim) and gives the opacity for it. 'rampup' goes from transparent to opaque over 64 entries.
Input arguments
name- Name of a predefined shape.
A- Vector of alpha values between 0 and 1.
Output arguments
A- Column vector with the current alphamap.
Example
A rising ramp
alphamap('rampup')
m = alphamap;
disp(size(m))
disp(m(1:3)')
Output
ans = 64×1
0
0.0159
0.0317
0.0476
0.0635
0.0794
0.0952
0.1111
0.1270
0.1429
0.1587
0.1746
0.1905
0.2063
0.2222
0.2381
0.2540
0.2698
0.2857
0.3016
0.3175
0.3333
0.3492
0.3651
0.3810
0.3968
0.4127
0.4286
0.4444
0.4603
0.4762
0.4921
0.5079
0.5238
0.5397
0.5556
0.5714
0.5873
0.6032
0.6190
0.6349
0.6508
0.6667
0.6825
0.6984
0.7143
0.7302
0.7460
0.7619
0.7778
0.7937
0.8095
0.8254
0.8413
0.8571
0.8730
0.8889
0.9048
0.9206
0.9365
0.9524
0.9683
0.9841
1.0000
64 1
0 0.0159 0.0317