[R] Help with XYPLOT with marginal histograms

Gaj Vidmar gaj.vidmar at mf.uni-lj.si
Thu Feb 12 09:35:45 CET 2009


If you have many data points and/or have to depict several groups of them on 
the same graphics, and are -- to gain clarity -- willing to substitute

- points with their <summary> (i.e, convex hull or density contour, plus a 
cross or ellipse depicting measures of centre and variability), and
- marginal histograms with either relative frequency polygons or density 
estimates,

just use the package chplot.

It's available at CRAN and extremely easy to use (for R standards) - see the 
PDF manual. The added benefit is depicting correlation with the ellipse, and 
obtaining a bivariate measure of variability. After you produce the plot 
with the chplot function, you can add further elements with the chadd 
function. The package also contains one sample (large) datadaset.

A paper (in CMPB, 2005) about is available at
http://www1.mf.uni-lj.si/ibmi/biostat-center/predtiski/CMPB_Vidmar_Pohar_chplot.pdf.

Note that chplot allows you to depict the points themselves, too (and even 
skip the convex hull/density contour), but that is basically the oposite of 
its main idea, which is to provide clarity with many points (from hundreds 
to hundreds of thousands) and/or several groups.

Best regards,

Assist.Prof. Gaj Vidmar, PhD
Institute for Rehabilitation, Republic of Slovenia &
Univ. of Ljubljana, Fac. of Medicine, Inst. of Biomedical Informatics

"Deepayan Sarkar" <deepayan.sarkar at gmail.com> wrote in message 
news:eb555e660902111259o1c118567y4e0cc3812dce5d45 at mail.gmail.com...
> On Wed, Feb 11, 2009 at 12:37 PM, John Leonard
> <john.leonard at coe.gatech.edu> wrote:
>> I am trying to replicate the following plot using Lattice:
>>
>>  http://addictedtor.free.fr/graphiques/graphcode.php?graph=78
>
> Why? lattice is not the right tool for this.
>
> Try looking at
>
> http://www.stat.wisc.edu/~deepayan/771/esplot.R
>
> with explanations in
>
> http://www.stat.wisc.edu/~deepayan/771/rgraphics.pdf
>
> -Deepayan
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list