[R] drawing an axis using axis command

John Kane jrkrideau at yahoo.ca
Mon Jul 6 21:13:16 CEST 2009



I am clearly doing something extremely stupid here but why is this code not writing the axis values for this graph?

Any suggestions gratefully received.


structure(list(year = c(1911L, 1921L, 1931L, 1941L, 1951L, 1961L, 
1971L, 1981L, 1991L, 2001L, 2006L), total = c(7206643L, 8788483L, 
10376786L, 11506655L, 14009429L, 18238247L, 21568310L, 24083500L, 
26994045L, 29639030L, 31241030L), non = c(5619682L, 6832747L, 
8069261L, 9487808L, 11949518L, 15393984L, 18272780L, 20240165L, 
22427745L, 23991910L, 24788720L), imm = c(1586961L, 1955736L, 
2307525L, 2018847L, 2059911L, 2844263L, 3295530L, 3843335L, 4342890L, 
5448480L, 6186950L), nonperm = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 
0L, 223410L, 198640L, 265360L)), .Names = c("year", "total", 
"non", "imm", "nonperm"), class = "data.frame", row.names = c(NA, 
-11L))

plot(myxx[,1],myxx[,3], xaxt="n",
xlab="Census Years", ylab="Population"
 pch=16, col=" red")
axis(3, at=1:11, labels=myxx[,1]) 




      __________________________________________________________________
[[elided Yahoo spam]]




More information about the R-help mailing list