[R] axis values on lattice log-scale plot

Don McKenzie dmck at u.washington.edu
Tue Apr 7 18:22:13 CEST 2009


I'm plotting the following (stripped of inessentials)

xyplot(sd ~ distance | wshed,data=sdvar.df,scales=list(x=list 
(log=TRUE),y=list(log=TRUE)))

sdvar.df  is a data frame, sd and distance are numeric, wshed is an  
ordered factor

trying to replicate the action of  log="xy" in plot()

The plot works fine but the axis values at the ticks are in  
scientific notation,
e.g. 10^1.5, 10^2.0, ... on the X axis and 10^-.5, 10^-.4, ... on the  
Y axis.

I've searched the lattice help (and I know it must be in there    :- 
()  and the archive but can't seem to find a way to make
the axis values display as simply numeric  (i.e., 10,100,1000, ... on  
the X axis and proportions on the Y axis).

Suggestions much appreciated.

R 2.8.1 on mac OSX 10.4.11



Don McKenzie, Research Ecologist
Pacific WIldland Fire Sciences Lab
US Forest Service

Affiliate Professor
College of Forest Resources
CSES Climate Impacts Group
University of Washington

desk: 206-732-7824
cell: 206-321-5966
dmck at u.washington.edu
donaldmckenzie at fs.fed.us




More information about the R-help mailing list