It is possible, but only by using axis() since you can specify axis breaks in a plot command, but not the labels. You can ignore most of the axis() options so the commands are pretty simple:
plot(x=c(1, 1000000), y=c(1, 1000000), xlab="x", ylab="y", xaxt="n", yaxt="n", las=2) pos <- c(0, 200000, 400000, 600000, 800000, 1000000) lbl <- c("0", "200k", "400k", "600k", "800k", "1000k") axis(1, pos, lbl) axis(2, pos, lbl) # or axis(2, pos, lbl, las=2) to rotate the y tick mark labels. ---------------------------------------------- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Sam Steingold > Sent: Thursday, December 20, 2012 1:22 PM > To: r-help@r-project.org > Subject: [R] axes labeling > > Is it possible to control formatting of the numbers which go along the > axes in plots? > e.g. > plot(x=1:1000000,y=1:1000000) > will label the X axis as "0d+00", "2e+05" &c. > I want that to read 0, 200k, 400k &c. > I know of the function axis(), but it offers far too much control for > this simple task. > thanks. > -- > Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X > 11.0.11103000 > http://www.childpsy.net/ http://www.memritv.org http://jihadwatch.org > http://pmw.org.il http://americancensorship.org http://think-israel.org > Why do we want intelligent terminals when there are so many stupid > users? > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.