Dear Madame or Sir,I am having a problem in combining density-smoothed 
scatterplot matrices with a plot of kernel destiny estimations of each 
dimension plotted on the respective field of the diagonal.I have tried 
following approach using the package "sm" for the kernel density estimation, as 
well as "MASS" respectively:pairs(myTable[, 1:4],panel=function(x,y, ...){     
xy=kde2d(x,y)     image(xy, add=TRUE)},diag.panel = 
function(x,...){plot(density(x), add = TRUE)#boxplot(x, add = TRUE)})where 
myTable is an ordinary table I am using the first four columns of. 
Unfortunately this produces an error stating that plot has created a new plot. 
I suppose this is the same situation when forgetting "add  = TRUE" with 
plotting functions such as boxplot (as in my code used with "boxplot(x, add = 
TRUE)" ) or any other (e.g. smoothScatter). Analyzing the partial plot,  which 
can be seen before R rejects my code, I come to the conclusion that add might 
not be a valid argument for "plot". My questions therefore is, whether there is 
an option to plot the result of the 1d kernel density estimation to the 
diagonal of the scatterplot produced by pairs or which plot function is valid 
in this case. So basically I would like to generate the same output I am able 
to produce with boxplots on the diagonal with a density estimation.Additional 
question: I bet there is an opportunity to include both the boxplot and the 
kernel density estimation on each field of the diagonal (as I saw before in a 
published paper), but I just could not figure out how to "overdraw". Maybe you 
could give me a slight idea (reference would be fine, too) on how to achieve 
this. I would be highly thankful!Kind regards and many thanks in 
advance,-Patrick Grossman --
Patrick Großmann - HiWi zur Netzwerkdokumentation
Network Operation Center    NOC
Hochschulrechenzentrum    HRZ    Universität Bielefeld

Büro:
UHG V0-251
Telefon:
+49 521 106-12618
Fax:
+49 521 106-2969 
Telefon Sekretariat:
+49 521 106-4951

http://www.uni-bielefeld.de/hrz/



        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to