function pp = stplt(p0,n)

xx = 0:4;
pp = p0;

bar(xx,pp);
ax = axis;		% Get the axis limits

 for i=1:n
   pp = state(pp,i);   % use the state function compute the state
   bar(xx,pp);         % Plot the state
   axis(ax);  	       % Set the axis limits so the axes don't jump about
   pause(1.0);         % Pause to display
 end;

