OK, I need help plotting.  I have column headings of Day, Wgt, Foodin, Rep,
Grp and Tanks.  Rep=c(1,2,3) and Tanks=c(a1,a2,a3,a4,a5,a6,
c1,c2,c3,c4,c5,c6, h1,h2,h3,h4,h5,h6).

I created a subset where I only would like Rep=2, and Tanks=c(a4,c4,h4) and
would like to graph (points) of Wgt and Day.  I would think that I only need
3 colors, but when I run with only 3, only 2 lines show up.  When I add a
4th color (pink in this case), I get the 3rd line.  If I subset for
c(a1,a2,a3), it works using three colors.  Should be simple, but I dont see
it.

rm(list=ls())

daily<-subset(raw, subset=Foodin>1 & Rep==2 & Grp=="fed" & Tanks=="a4"|
Foodin>1 & Rep==2 & Grp=="fed" & Tanks=="c4"|Foodin>1 & Rep==2 & Grp=="fed"
& Tanks=="h4")
attach(daily)
x11()
par(cex=1.4)
plot(Day, Wgt col=c("red","blue","purple","pink")[Tanks])
detach(daily)


-- 
M. Keith Cox, Ph.D.
Alaska NOAA Fisheries, National Marine Fisheries Service
Auke Bay Laboratories
17109 Pt. Lena Loop Rd.
Juneau, AK 99801
Keith.Cox@noaa.gov
marlinkcox@gmail.com
U.S. (907) 789-6603

	[[alternative HTML version deleted]]

