####################################################################################
## University of California
####################################################################################
NYR<-15;
NRACE<-9
x<-matrix(0,NYR,NRACE+2);
##Year AsianPacIs Black Filipino Latino NatAmer
## Other White NonResAlien NoResponse Totals
x[1,]<-c(1996 ,44796 ,6477 ,5883 ,20251 ,1510 ,2807 ,71008 ,6992 ,6994 ,166718);
x[2,]<-c(1997 ,46237 ,6350 ,6211 ,20072 ,1491 ,3142 ,71658 ,7730 ,6971 ,169862);
x[3,]<-c(1998 ,47066 ,6023 ,6499 ,19764 ,1399 ,3293 ,71009 ,8196 ,10394 ,173643);
x[4,]<-c(1999 ,48462,5722 ,6782 ,19739 ,1265 ,3469 ,72606 ,8200 ,12165 ,178410);
x[5,]<-c(2000 ,49735 ,5654 ,7043 ,20083 ,1144 ,3618 ,73714 ,9139 ,13225 ,183355);
x[6,]<-c(2001 ,52339 ,5572 ,7455 ,21386 ,1140 ,3938 ,75647 ,10168 ,14258 ,191903);
x[7,]<-c(2002 ,55852 ,5807 ,7973 ,22976 ,1204 ,4290 ,77833 ,11165 ,14197 ,201297);
x[8,]<-c(2003 ,57951 ,6103 ,8232 ,24771 ,1232 ,4733 ,79145 ,11708 ,14516 ,208391);
x[9,]<-c(2004 ,58762 ,6049 ,8120 ,24992 ,1208 ,5006 ,77655 ,11816 ,14301 ,207909);
x[10,]<-c(2005 ,60297 ,6083 ,8214 ,25518 ,1188 ,5182 ,77374 ,11456 ,13768 ,209080);
x[11,]<-c(2006 ,63064 ,6281 ,8217 ,26907 ,1196 ,5424 ,78453 ,11469 ,13287 ,214298);
x[12,]<-c(2007 ,65534 ,6647 ,8437 ,28613 ,1258 ,5700 ,78957 ,12182 ,12706 ,220034);
x[13,]<-c(2008 ,68031 ,7137 ,8550 ,30981 ,1264 ,5811 ,79080 ,12996 ,12190 ,226040);
x[14,]<-c(2009,69236 ,7508 ,8653 ,33398 ,1344 ,5994 ,79134 ,13809 ,11452 ,230528);
x[15,]<-c(2010 ,69871 ,7990 ,8636 ,35993 ,1539 ,17544 ,77715 ,15176 ,0 ,234464);
##Combine 'Other' and 'No response',
##i.e., column 7 and 10==>column8
##Combine 'Native' and 'Fillipino',
##i.e., column 4 and 6==>column4
y<-matrix(0,NYR,NRACE+2);
for(i in 1:5) {y[,i]<-x[,i];}
y[,4]<-y[,4]+x[,6];
y[,6]<-x[,8];
y[,7]<-x[,7]+x[,9]+x[,10];
y[,8]<-x[,11];
##Swap Asian and Native
z<-y[,2];y[,2]<-y[,4];y[,4]<-z;
for(i in 1:NYR) { y[i,]<-y[i,]*100/y[i,8];}
z<-t(y[,2:7]);
colors<-c("blue","red","gold","grey","cyan", "brown");
ethnics<-c("Other/Unknown", "White", "Hispanic", "Asian", "Black","Native/Filipino");
##jpeg(file="uc2.jpg");
##postscript("bplotUCenroll.eps");
b<-barplot(z, main="UC enrollment 1996-2010",
col=colors,
las=2, cex.names=0.5, axes=FALSE,legend.text=FALSE,
xlim=c(0,28),width=1);
legend("bottomright",
bty="n",
cex=0.9,
legend=ethnics,
fill=rev(colors));