Hi Philip, par(new=TRUE) before your hist(y) lines should do the trick.
You may have to modify some settings in case the axes are not overlayed perfectly. Sebastien [EMAIL PROTECTED] a écrit : > Dear R users, > > I used plot(x,y) to draw a scatter plot. I need to add another smaller > histogram on the same plot I just had. However when I used hist(y), the > histogram was on another page. > > Any suggestion? > > Best Regards, > > Philip > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@stat.math.ethz.ch 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. > > > ______________________________________________ R-help@stat.math.ethz.ch 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.