greg.j...@weyerhaeuser.com
unread,Mar 19, 2009, 1:33:45 PM3/19/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Forest-R
As I advance in years things are never as obvious as they one were.
Here's a quick summary of some clean ways to label log scales on
trellis graphs.
To plot some points using a log y axis you cannot use the normal
graphics idiom of:
xyplot( c(1:100)~c(1:100), log="y" ) # this doesn't work
Rather you have to set the scales list appropriately:
xyplot( c(1:100)~c(1:100), scales=list(y=list(log=10)) ) # this works
However, the y axis is labeled 10^0, 10^1, 10^2 ... While correct,
it's generally not what we expect to see. To correct it just add an
"at" list to the scales y list:
xyplot( c(1:100)~c(1:100), scales=list(y=list(log=10,at=c
(1,10,100))) )
Voila!