Displaying 1 result from an estimated 1 matches for "usepoly".
Did you mean:
usepolyg
2006 Oct 19
0
Rug-like density plots on margins of figure
...TRUE)
omar = par("mar")
l = layout(matrix(c(2,0,1,3),2),c(1,4),c(4,1))
par(cex=1,bty="n")
# first plot : main plot
par(mar=omar * c(0,0,1,1)) # just top and right margins
plot(x1, y1, axes=FALSE, main="Density Margins",
xlab="", ylab=""
)
# vars
usepoly <- TRUE
plott = ifelse(usepoly,"n","l")
par(col="blue")
# second plot : y axis density
par(mar=omar * c(0,1,1,0))
par(xpd=NA)
yd = density(y1,from=min(y1),to=max(y1))
ydd= data.frame(x=-yd$y, y=yd$x)
plot(ydd, xaxt="n",xlim=c(0,min(ydd$x)),type= plott,bty...