%Demonstrates the loss of the top of the plot, should ylim not be invoked explicitly.
N = 4;
x = 1:0.25:N;		%Concoct some data to plot.
y = 4 - (x - 2.5).^2;
dy = sqrt(y);		%Concoct some offsets. The original was for lines joining the max. to the upper quartile value.
ns = 3*length(x);
xb(1:ns) = 0;
yb(1:ns) = 0;
nb = 0;			%Points to make vertical bars.
for s = 1:length(x)
  nb = nb + 1; xb(nb) = x(s); yb(nb) = y(s) + dy(s);	%Base of the vertical bar.
  nb = nb + 1; xb(nb) = x(s); yb(nb) = y(s) + dy(s)*2;	%Top of the vertical bar.
  nb = nb + 1; xb(nb) = x(s); yb(nb) = NaN;		%Separate the lines. Using a normal value such as 5 just makes connections.
endfor;

for Fig = 1:2	%Two trials.
  hold off; figure(Fig); clf;
  hold on;
  xlim([0 N + 1]);
  if Fig == 1
    ylim([0 10]);
    title('Test 1: with ylim');
   else
    title('Test 1: no ylim');
  endif;
  set(gcf,'Toolbar','none');		%I want more data space, less cybercrud.
  set(gcf,'Units','points'); 		%"Points", a fixed size, whereas dots are variable. Usual screen style is ~90 dots/inch.
  set(gca,'Units','points');	;	%I'm presuming that the size of the lettering is fixed in terms of points.
  set(gca,'TickDir','out');		%Do not deface the data area with non-data.
  hf = get(gcf,'Position');		%(x,y) lower left; (width,height), in unclear units despite the specification of "ponts".
  h = max(hf(3:4));			%The larger of the width and height apparently is used in the relative sizing..
  set(gca,'TickLength',[4 6]/h);	%Ticks should be small. [2Dlength 3Dlength]...
  expose = 'on';			%Counts as an entry for a later "legend" command.
  plot(x,y,'b','HandleVisibility',expose);	%These squiggles would be given an entry in the legend.
  expose = 'off';				%Added dcorations are not to count.
  plot(xb,yb,'color','g','HandleVisibility',expose);	%Changing "line" to "plot" makes no difference.
  Av = sum(y)/length(y);			%Another decoration.
  plot([x(1) x(2) x(end - 1) x(end)], [NaN Av Av NaN],'k','HandleVisibility',expose);

  ylabel('Unit.'); grid on
  xlabel('Unit');
endfor;