I've produced the graph shown below which looks fine except for the
y-labels of the middle row (too many).
load("test.rda")
p <-
ggplot(data = my.df2, mapping = aes(x = wavelength, y = value)) +
facet_grid(variable~regime, scale="free")+
layer(mapping=aes(colour=factor(pitch)), geom = c( "line"), stat =
"identity" ) +
scale_x_continuous(expression("wavelength / "*mu*m)) +
scale_y_continuous("") +
scale_colour_hue("h / nm", h=c(-120, 150)) +theme_bw()
To force the limits of each row to 1, 0, 0, respectively, I had to use
a trick of adding a geom_blank() with some dummy data,
lims <- data.frame(y = c(0, 1, 0), variable=factor(c("reflectance",
"transmittance", "absorbance")))
p +
geom_blank(data=lims, mapping=aes(y=y, x=0.6))
this does the job but I don't know how to change the number of breaks per panel.
Ideally, I would set something like,
p +
scale_y_continuous( limits = list(c(NA,1), c(0,NA),c(0,NA)),
breaks = list(seq(0.8, 1, by=0.2), seq(0, 0.02, by=0.005),
seq(0, 0.2, by=0.05)))
(that would be like the syntax in lattice)
Best regards,
baptiste
_____________________________
Baptiste Auguié
School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK
Phone: +44 1392 264187
http://newton.ex.ac.uk/research/emag
______________________________