Hi everyone,

I hope this question is beyond "read the manual". My task is simple, just
to plot the following, but the plot in the middle should be a
filled.contour plot:
http://gallery.r-enthusiasts.com/graph/Scatterplot_with_marginal_histograms_78

Background: I prefer filled.contour rather than hist2d. Because, I could
use kernel smooth, so the plot for discrete data won't be too ugly. I also
tried image() and then contour(), but the number on contour is not clear
and no indication about the color.

My problem: in filled.contour function, it uses layout() for
filledcontour() plot and rect() plot (color bar). However, I use layout()
in the outside code to organize 2 histogram and one filled.contour plot.
Looks like, the layout outside is shadowed by filled.contour(). I am not
sure how R deal with this problem. Should I rewrite filled.contour()
somehow?

Thank you very much!
Jing Lu

	[[alternative HTML version deleted]]

