(1) Is there a (simple) way of getting cloud() to do *both*
type="p" and type="h"? I.e. of getting it to plot the points
as points *and* drop a perpendicular line to the underlying plane?
(2) Is there a way of telling cloud() to drop its lines to the
floor of the bounding box, rather than to the plane z=0?
I thought that the "zero.scaled" argument (for panel.3dscatter())
might be the ticket here, but when I pass this argument to cloud()
I get an error ``Error using packet 1 formal argument "zero.scaled"
matched by multiple actual arguments".
Ta.
cheers,
Rolf Turner
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
Two questions about cloud().
3 messages · Deepayan Sarkar, Rolf Turner
1 day later
On Tue, Nov 3, 2009 at 3:57 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote:
(1) Is there a (simple) way of getting cloud() to do *both* type="p" and type="h"? ?I.e. of getting it to plot the points as points *and* drop a perpendicular line to the underlying plane?
Yes, 'type' can be a vector, similar to the behaviour in xyplot():
cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris, type =
c("p", "h"))
(2) Is there a way of telling cloud() to drop its lines to the floor of the bounding box, rather than to the plane z=0? I thought that the "zero.scaled" argument (for panel.3dscatter()) might be the ticket here, but when I pass this argument to cloud() I get an error ``Error using packet 1 formal argument "zero.scaled" matched by multiple actual arguments".
There doesn't seem to be an easy way. (To use 'zero.scaled', you would need a custom panel.3d.cloud argument which captures 'zero.scaled' and replaces it, etc., which is not really what you should need to do.) Unless you are using arrows=FALSE on the z-axis, you could easily fake it by increasing the z-values (e.g., z-min(z)). Longer term, I could add an 'origin' argument to panel.cloud, similar to what panel.barchart supports. Would that suffice for you? You would still need to pre-compute the origin, in this case the lower zlim. -Deepayan
4 days later
On 5/11/2009, at 6:49 PM, Deepayan Sarkar wrote:
On Tue, Nov 3, 2009 at 3:57 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote:
(1) Is there a (simple) way of getting cloud() to do *both* type="p" and type="h"? I.e. of getting it to plot the points as points *and* drop a perpendicular line to the underlying plane?
Yes, 'type' can be a vector, similar to the behaviour in xyplot():
cloud(Sepal.Length ~ Petal.Length * Petal.Width, data = iris, type =
c("p", "h"))
Ah-ha. That's great. I guess I should RTFM more carefully.
(2) Is there a way of telling cloud() to drop its lines to the floor of the bounding box, rather than to the plane z=0? I thought that the "zero.scaled" argument (for panel.3dscatter()) might be the ticket here, but when I pass this argument to cloud() I get an error ``Error using packet 1 formal argument "zero.scaled" matched by multiple actual arguments".
There doesn't seem to be an easy way. (To use 'zero.scaled', you would need a custom panel.3d.cloud argument which captures 'zero.scaled' and replaces it, etc., which is not really what you should need to do.)
I thought there might be a strategy like that, but I wanted to check first and see if there was something simpler. This may give me a workaround for the context in which I currently need to do this. I'll give it a go.
Unless you are using arrows=FALSE on the z-axis, you could easily fake it by increasing the z-values (e.g., z-min(z)).
Don't really understand this. (Sorry; I'm a thicko.) I'll fiddle about and see what I can shake out of the tree.
Longer term, I could add an 'origin' argument to panel.cloud, similar to what panel.barchart supports. Would that suffice for you? You would still need to pre-compute the origin, in this case the lower zlim.
Yes, that should be fine. Thanks.
cheers,
Rolf
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}