Walmes Marques Zeviani
2010-May-26 20:09 UTC
[R] Is possible a mini-plot into a big plot with Lattice?
Hello, I want to do with Lattice functions (qqmath, histogram) a figure like this below. n <- 1000 x <- rnorm(n) qqnorm(x); qqline(x) op <- par(fig=c(.02,.5,.5,.98), new=TRUE) hist(x, xlab="", ylab="", main="", axes=FALSE) box() par(op) Is possible? Thanks. Walmes Zeviani. _________________________________________________________________ CANSADO DE ENTRAR EM TODAS AS SUAS DIFERENTES CONTAS DE EMAIL? JUNTE TODAS AGORA. [[elided Hotmail spam]] [[alternative HTML version deleted]]
Paul Murrell
2010-May-26 22:27 UTC
[R] Is possible a mini-plot into a big plot with Lattice?
Hi On 27/05/2010 8:09 a.m., Walmes Marques Zeviani wrote:> > Hello, > > I want to do with Lattice functions (qqmath, histogram) a figure like this below. > n<- 1000 > x<- rnorm(n) > qqnorm(x); qqline(x) > op<- par(fig=c(.02,.5,.5,.98), new=TRUE) > hist(x, xlab="", ylab="", main="", axes=FALSE) > box() > par(op) > > Is possible?Something like ... ? library(lattice) library(grid) qqmath(x, panel=function(...) { panel.qqmath(...) panel.abline(a=0, b=1) pushViewport(viewport(.02, .5, .48, .48, just=c("left", "bottom"))) print(histogram(x, xlab=NULL, ylab=NULL, scales=list(draw=FALSE)), newpage=FALSE) popViewport() }) Paul> Thanks. > Walmes Zeviani. > > > _________________________________________________________________ > CANSADO DE ENTRAR EM TODAS AS SUAS DIFERENTES CONTAS DE EMAIL? JUNTE TODAS AGORA. > > [[elided Hotmail spam]] > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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.-- Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 paul at stat.auckland.ac.nz http://www.stat.auckland.ac.nz/~paul/
Seemingly Similar Threads
- Use line break at scrip but avoid line break on graphics
- ternary contour plot
- multcomp::glht() doesn't work for an incomplete factorial using aov()?
- How to provide a result from D(f(x), "x") to a curve(f'(x)) ???
- Lattice densityplot with semitransparent filled regions