Hello,

I want to draw a boxplot using 13 colors for 13 boxes.
Each box represents a type of diet of birds.
Y axis is the breeding range of the birds.

I checked the previous r-help and found a possible solution.

However, it did not work by showing "error in ncol(Diet_B)," Diet_B not
found.
Please kindly help with modification and thank you.
Also, if anything is unclear, please let me know.


code
# data input
    dataN <-read.csv("H:/Mig_bird_586_20120925.csv",header=T, row.names=1)
    dataN$Diet_B <-factor(dataN$Diet_B)

# graph
    par(mai=c(1,1.03,0.4,0.4))
    boxplot(GE_distance~Diet_B, data=dataN, col = rep(seq(ncol(Diet_B)) +
1, each = 1))

	[[alternative HTML version deleted]]

