# subTest.m - test bed program to catch errors, trd 2010-04-23

x = 0:0.2:80;
y1 = sin (x);
y2 = sin (x*1.15);
y3 = y1 + y2;
y4 = y1 - y2;

subplot (4,1,1)
ax1 = gca ()
set (ax1,"position",[.1,.73,.84,.21])
plot (x,y1,"b;sin x;")
ylabel ("sin")
title ("simple multipanel demo")

subplot (4,1,2)
ax2 = gca ()
set (ax2,"position",[.1,.52,.84,.21])
plot (x,y1,"r;sin 1.15*x;")
ylabel ("sin")

subplot (4,1,3)
ax3 = gca ()
set (ax3,"position",[.1,.31,.84,.21])
plot (x,y3,"g")
ylabel ("sin+sin")

subplot (4,1,4)
ax4 = gca ()
set (ax4,"position",[.1,.1,.84,.21])
plot (x,y4,"k")
ylabel ("sin-sin")
xlabel ("x")

FigId = "portrait.pdf";
print (FigId, "-color")
FigId = "landscape.pdf";
print (FigId, "-landscape", "-color")

