close all;

fig1 = figure;
hax1 = axes;
printf ("hax1 = %f\n", double (hax1));
fig2 = figure;
hax2 = axes;
printf ("hax2 = %f\n", double (hax2));
printf ("gca before newplot = %f\n", double (gca));
h = newplot (hax1);
printf ("gca after newplot = %f\n", double (gca));
printf ("handle returned from newplot (should be hax1) = %f\n", double (h));
