Dear R users:
I am having difficulty to place x-axis location alternatively
top/bottom side in Lattice plot, which is composed of seven-column as
following:
E1 E2 E3 E4 E5 E6 E7
Case1 -505.85 -75.32 494.52 -12.31 -98.96 50.34 -48.62
Case2 -50.46 -60.97 68.32 -8.66 -51.77 25.17 -26.60
Case3 -253.00 -54.99 243.48 -8.76 -73.27 35.46 -37.81
Case4 94.73 -20.27 -83.70 -3.17 -12.41 15.01 2.6
To adjust x-axis scale per column, I used prepanel function followed
by scales argument. But then I wanted to mimic "alternating" option
manually for x-axis location to prevent congestion among adjacent
x-axis numbers.
How can I make a list for axis location when relation = "free" is
used?
Thanks for your help in advance.
/////////////////////
pdf("Lattice.pdf")
library("lattice")
mydata<-as.matrix(read.table("Data.txt"),
rownames.force='automatic')
dotplot(mydata,
prepanel = function(x, ...) {
list(xlim = c(min(x), max(x)))
},
scales = list(x = "free"),
groups = FALSE,
layout = c(7, 1),
aspect = 1,
origin = 0,
type = c("p", "h"),
)
q()
/////////////////////
_____________
In-Hee Park