murdoch at stats.uwo.ca
2010-Feb-02 12:25 UTC
[Rd] [R] Suppressing scientific notation on plot axis tick labels (PR#14202)
On 02/02/2010 6:20 AM, Dimitri Shvorob wrote:> Ruben Roa has kindly suggested using 'scipen' option - cf. > >> fixed notation will be preferred unless it is more than ???scipen??? digits >> wider. > > However, > > options(scipen = 50) > x = c(1e7, 2e7) > barplot(x) > > still does not produce the desired result.This is strange. I see what you describe the first time through, but if I print the option I get the non-scientific labels on the second plot: options(scipen = 50) x = c(1e7, 2e7) barplot(x) options("scipen") barplot(x) Looks like some sort of caching bug to me. I don't think I'll have time to track this down; this is a crazy week. I see the same thing in R-devel as in 2.10.1. Duncan Murdoch Version: platform = i386-pc-mingw32 arch = i386 os = mingw32 system = i386, mingw32 status major = 2 minor = 10.1 year = 2009 month = 12 day = 14 svn rev = 50720 language = R version.string = R version 2.10.1 (2009-12-14) Windows XP (build 2600) Service Pack 3 Locale: LC_COLLATE=English_Canada.1252;LC_CTYPE=English_Canada.1252;LC_MONETARY=English_Canada.1252;LC_NUMERIC=C;LC_TIME=English_Canada.1252 Search Path: .GlobalEnv, package:stats, package:graphics, package:grDevices, package:utils, package:datasets, package:methods, Autoloads, package:base
Peter Dalgaard
2010-Feb-02 13:07 UTC
[Rd] [R] Suppressing scientific notation on plot axis tick labels (PR#14202)
murdoch at stats.uwo.ca wrote:> On 02/02/2010 6:20 AM, Dimitri Shvorob wrote: >> Ruben Roa has kindly suggested using 'scipen' option - cf. >> >>> fixed notation will be preferred unless it is more than ???scipen??? digits >>> wider. >> However, >> >> options(scipen = 50) >> x = c(1e7, 2e7) >> barplot(x) >> >> still does not produce the desired result. > > This is strange. I see what you describe the first time through, but > if I print the option I get the non-scientific labels on the second plot: > > options(scipen = 50) > x = c(1e7, 2e7) > barplot(x) > options("scipen") > barplot(x) > > Looks like some sort of caching bug to me. I don't think I'll have time > to track this down; this is a crazy week. I see the same thing in > R-devel as in 2.10.1.Same thing with, e.g. x <- c(1e7, 2e7) options(scipen =3) barplot(x) x barplot(x) options(scipen=0) barplot(x) x barplot(x)> Duncan Murdoch > > Version: > platform = i386-pc-mingw32 > arch = i386 > os = mingw32 > system = i386, mingw32 > status > major = 2 > minor = 10.1 > year = 2009 > month = 12 > day = 14 > svn rev = 50720 > language = R > version.string = R version 2.10.1 (2009-12-14) > > Windows XP (build 2600) Service Pack 3 > > Locale: > LC_COLLATE=English_Canada.1252;LC_CTYPE=English_Canada.1252;LC_MONETARY=English_Canada.1252;LC_NUMERIC=C;LC_TIME=English_Canada.1252 > > Search Path: > .GlobalEnv, package:stats, package:graphics, package:grDevices, > package:utils, package:datasets, package:methods, Autoloads, package:base > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel-- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907