Displaying 2 results from an estimated 2 matches for "insetplot".
Did you mean:
indexplot
2007 Sep 13
1
minimize white space around lattice plot
...{
## open our viewport ...
pushViewport(viewport(x=ixpos, y=iypos, width=iwidth, height=iheight,
just=ijust, name="inset"))
if(drawRect)
grid.rect(gp=gpar(lwd=1,col="black"))
## ... and place the other plot inside there
print(inset, newpage=FALSE, prefix="insetPlot")
upViewport()
## draw the actual plot
panel.xyplot(...)
## why is this neccessary?? Otherwise I get no lines for the axis ...
grid.rect(gp=gpar())
}
x<-0:10
y<-x^4
insetPlot <- xyplot(y ~ x, scales=list(log=T), main=NULL, aspect="fill")
xyplot(y ~ x, panel...
2012 Apr 20
1
Ternaryplot as an inset graph
...It overlays the old plot rather than plotting as an inset.
Here is a simple version of what I'm trying. Note that if I change the
inset plot to be an ordinary scatter, for instance, it works as
expected.
library(ade4)
library(vcd)
tdat <- data.frame(x=runif(20), y=rlnorm(20), z=rlnorm(20))
insetPlot <- function(data){
ternaryplot(data)
}
ternaryplot(tdat)
add.scatter(insetPlot(tdat), posi="topleft", ratio=.2)
Thanks very much,
Jennifer Young
Fisheries and Oceans Canada
Jennifer.Young@dfo-mpo.gc.ca
[[alternative HTML version deleted]]