[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-help
Subject:    Re: [R] Identifying a subset of observations on a 3d-scatter plot
From:       "Deepayan Sarkar" <deepayan.sarkar () gmail ! com>
Date:       2008-12-09 0:56:44
Message-ID: eb555e660812081656w6d078861uec9d965f8bb6b3ca () mail ! gmail ! com
[Download RAW message or body]

On Sat, Dec 6, 2008 at 9:27 PM, Giam Xingli <giam@nus.edu.sg> wrote:
> Hello everyone,
> 
> This is my first post to the mailing list, so I hope I am posting my message the \
> correct way. 
> I am trying to present my dataset in a 3d scatterplot using cloud() in the \
> {lattice} package. I hope to explicitly identify a subset of my observations. The \
> observations in this subset need to satisfy the following critera (values on x,y, \
> and z axes above a certain cutoff value). It will be great if I can get advice on \
> how to annotate the points representing the subset of observations with a different \
> colour, and if possible, label the points. 

For colors, you could try

cloud(z ~ x * y, ..., groups = (x > c1 & y > c2 & z > c3))

For interactive labeling, see ?panel.identify.cloud. Direct labeling
is also possible, but you need to write a panel function
('panel.3dtext' in the latticeExtra pacakge may help).

-Deepayan

______________________________________________
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.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic