Message-ID: <eb555e660812081656w6d078861uec9d965f8bb6b3ca@mail.gmail.com>
Date: 2008-12-09T00:56:44Z
From: Deepayan Sarkar
Subject: Identifying a subset of observations on a 3d-scatter plot using cloud()
In-Reply-To: <9BD0FDD497B6464682342F906E32305404271E4B@MBX23.stu.nus.edu.sg>
On Sat, Dec 6, 2008 at 9:27 PM, Giam Xingli <giam at 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