function scattertv(x,y,z,itr,ival)

zi=z(itr); xi=x(itr); yi=y(itr); 
scatter(xi(zi==0),yi(zi==0),'b'); hold on; scatter(xi(zi==1),yi(zi==1),'r'); hold on
if (length(ival)>0), 
    zi=z(ival); xi=x(ival); yi=y(ival); 
    scatter(xi(zi==0),yi(zi==0),'c'); hold on; scatter(xi(zi==1),yi(zi==1),'m')
    legend('obs 0','obs 1','pred 0','pred 1','location','NorthEastOutside') 
else
    legend('obs 0','obs 1','location','NorthEastOutside') 
end
hold off; legend boxoff
%


