Hi Hadley,
Here's a hopefully reproducible example:
---
dts <- seq(as.Date("2008-1-1"), as.Date("2008-12-31"), by="day")
set.seed(1)
y1 <- cumprod(1.001 + rnorm(366)/100)
y2 <- cumprod(1.01 + rnorm(366)/100)
da <- data.frame(Date=dts, Liar=y2, Excellent=y1)
require(reshape)
mda <- melt(da, id.vars = "Date")
ytx <- 2^(0:4)
p <- ggplot(mda, aes(Date, value)) +
scale_x_date("") +
scale_y_log10("Value of $1 Investment", breaks = ytx, labels =
ytx)
p + geom_line(aes(colour=factor(variable))) +
opts(title="An Unreal Performance") +
scale_colour_manual("Manager", values=c("red","purple")) +
facet_grid(variable~., scales = "free_y")
-----
The "2" label and tick mark of the bottom plot spills over to the top
plot.
Thanks for looking at it.
Roberto