Hello Bradley

I don't think there's an easy way to do what you want because the viewing
angles are internal to p3d().   Frankly p3d() tries to be all things to all
men (the arguments are a mess) and inevitably isn't as flexible as one might wish.

I take it you want to do this:

data(bunny)
p3d(head(bunny,100),d0=2,theta=3)
points(tail(bunny), col='blue')

You'd want the call to points() to "remember" theta=3,
and possibly d0=2 as well.

Although I can see a hack....

I'd be very happy to help you offline.


best wishes

Robin






Bradley Christoffersen wrote:
Hi,

Can anyone guide me as to how I can add points to a p3d() plot from
the onion package?  I want to plot points with different colors on the
same 3D plot.  Perhaps I can do this without adding points but somehow
directing the 'h' parameter to give different color to points based on
a factor I assign to them?

FYI, I can do this using using scatterplot3d() and points3d(), but
these plots lack perspective and hence it is hard to sense depth
without the use of color.

Thanks,
Brad

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


--
Robin K. S. Hankin
Uncertainty Analyst
University of Cambridge
19 Silver Street
Cambridge CB3 9EP
01223-764877

______________________________________________
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