function showinoutmid(w)
% plots the classification of b-splines for 2D
% splines are marked at the center of their support
% the inner and outer b-splines for w=1
% the extended and normal inner and outer bsplines for w=2
% Created by G.Apaydin in June 2006
global name gi gj x y xx yy bb n h;
axes(handles.axes1);hold on;
plot(x,y,'k',x',y','k','Linewidth',2);
for i=1:size(bb,1),
   for j=1:size(bb,2),
      if bb(i,j)==3,
         plot(xx(j)+(n+1)*h/2,yy(i)+(n+1)*h/2,'bo','MarkerFaceColor','b','MarkerSize',11);
      elseif bb(i,j)==2,
         plot(xx(j)+(n+1)*h/2,yy(i)+(n+1)*h/2,'go','MarkerFaceColor','g','MarkerSize',11);
      elseif bb(i,j)==1,
         plot(xx(j)+(n+1)*h/2,yy(i)+(n+1)*h/2,'ro','MarkerFaceColor','r','MarkerSize',11);
      end
   end
end
gii=find(bb==3);xlabel('x');ylabel('y');
if w==1,
   title([num2str(length(gj)),' outer, ',num2str(length(gi)),...
      ' inner b-splines for n=',num2str(n),' & h=',num2str(h)],'FontSize',16);
   saveas(gcf,['inoutbsplnmid',name,'.jpg']);cd(cwd);
else
   title([num2str(length(gj)),' outer, ',num2str(length(gii)),...
      ' extended inner & ',num2str(length(gi)-length(gii)),...
      ' standard inner b-splines for n=',num2str(n),...
      ' & h=',num2str(h)],'FontSize',8);
end
