File: face_alpha2_demo.m

package info (click to toggle)
octplot 0.4.0-7
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,072 kB
  • ctags: 1,563
  • sloc: cpp: 8,133; ansic: 5,053; sh: 617; makefile: 161
file content (30 lines) | stat: -rw-r--r-- 638 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
clf
# create sombrero
x = linspace(-8,8,42);
y = linspace(-8,8,44);
[xx,yy] = meshgrid(x,y);
r = sqrt(xx.^2 + yy.^2) + eps;
zz = sin (r) ./ r;
colormap(jet);
subplot(2,2,1)
pcolor(xx,yy,zz);
shading interp;
h=get(gca,'Children');
set(h,'FaceAlpha',1/3);
title('pcolor plot with alpha=1/3')
subplot(2,2,2)
pcolor(xx,yy,zz);
shading interp
h=get(gca,'Children');
set(h,'FaceAlpha',1/2);
title('pcolor plot with alpha=1/2')
subplot(2,2,3)
pcolor(xx,yy,zz);
shading interp;
h=get(gca,'Children');
set(h,'FaceAlpha',2/3);
title('pcolor plot with alpha=2/3')
subplot(2,2,4);
pcolor(xx,yy,zz);
shading interp
title('pcolor plot with alpha=1.0')