[R] Lattice / Trellis analog of axis(graphics) ?

2007-01-03 Thread Derek Eder
My question is so basic that I am (almost too) embarrassed to admit that 
I could not find an answer after an hour's worth of homework.

What is the Trellis / Lattice analog for the axis(graphics) function 
that enables the creation of axes in locations other than the default 
(i.e., bottom for X axis and right for Y axis) ?

For example when plotting mileage against weight (in American units), 
one might want to also include a second X axis on the top margin (e.g., 
axis() pos = 3) with fuel mileage in metric units.

xyplot(Mileage ˜ Weight, data = fuel.frame)


Thank you,

humbly yours,

Derek Eder





platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 4.0
year 2006
month 10
day 03
svn rev 39566
language R
version.string R version 2.4.0 (2006-10-03)

-- 
Derek N. Eder

Gothenburg University 
VINKLA - Vigilance and Neurocognition laboratory 

SU/Sahlgrenska
Utvecklingslab 1, Med
Gröna stråket 8
SE 413 45 Göteborg (Gothenburg)
Sverige (Sweden)

+46 (031)* 342 8261 (28261 inom Sahlgrenska)
+46 0704 915 714 (mobile)
+46 (031) 25 97 07 (home)

* omit the 0 when calling from outside Sweden

__
R-help@stat.math.ethz.ch 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.


Re: [R] Lattice / Trellis analog of axis(graphics) ?

2007-01-03 Thread Thomas Petzoldt
Hi Derek,

see ?xyplot and ?panel.axis

Hint: RSiteSearch(panel.axis) will point you to examples.

Thomas

Derek Eder wrote:
 My question is so basic that I am (almost too) embarrassed to admit that 
 I could not find an answer after an hour's worth of homework.
 
 What is the Trellis / Lattice analog for the axis(graphics) function 
 that enables the creation of axes in locations other than the default 
 (i.e., bottom for X axis and right for Y axis) ?
 
 For example when plotting mileage against weight (in American units), 
 one might want to also include a second X axis on the top margin (e.g., 
 axis() pos = 3) with fuel mileage in metric units.
 
 xyplot(Mileage ˜ Weight, data = fuel.frame)

[...]

__
R-help@stat.math.ethz.ch 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.


Re: [R] Lattice / Trellis analog of axis(graphics) ?

2007-01-03 Thread Deepayan Sarkar
On 1/3/07, Derek Eder [EMAIL PROTECTED] wrote:
 My question is so basic that I am (almost too) embarrassed to admit that
 I could not find an answer after an hour's worth of homework.

 What is the Trellis / Lattice analog for the axis(graphics) function
 that enables the creation of axes in locations other than the default
 (i.e., bottom for X axis and right for Y axis) ?

 For example when plotting mileage against weight (in American units),
 one might want to also include a second X axis on the top margin (e.g.,
 axis() pos = 3) with fuel mileage in metric units.

 xyplot(Mileage ˜ Weight, data = fuel.frame)

You might find the help page ?axis.default (and its example) useful.

-Deepayan

__
R-help@stat.math.ethz.ch 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.