Skip to content
Back to formatted view

Raw Message

Message-ID: <9209D2A2-543E-4834-9FF7-D766DED70C70@comcast.net>
Date: 2013-03-08T21:13:42Z
From: David Winsemius
Subject: 2D filled.contour plot with 1D histograms by axes
In-Reply-To: <CAJVaavGC1VWU1wd8re0aBvsujFBAzymb1jDR2sHMCP9esxgjig@mail.gmail.com>

On Mar 8, 2013, at 9:05 AM, Jing Lu wrote:

> 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?

Crossposting to CrossValidated and StackOverflow and the to Rhelp is deprecated. You should offer code and data and explain why the answers you have already been given are not adequate.

-- 

David Winsemius
Alameda, CA, USA