[R] cloud function doesn't plot
Forgive me please if this has been answered previously, but the r-help archive doesn't have a search capability. It's a pity, as I'm sure that there's a wealth of informative help in there. I am unable to get the cloud function to produce a fundamental 3D scatterplot. I have a 3-column numeric matrix: is.matrix(sanity.MIF); is.numeric(sanity.MIF); dim(sanity.MIF); cloud(sanity.MIF) [1] TRUE [1] TRUE [1] 29703 A blank grey graphics window is opened, but no vestige of a plot or labels of any kind. Can someone tell me what I am missing please? R 1.7.1 Windows2000 is new to me, but plenty of prior S-Plus Unix experience, including the use of the spin function for rotational 3D scatterplots. Thank You for your help. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] cloud function doesn't plot
From: Simon Blomberg [EMAIL PROTECTED] Date: Mon, 23 Jun 2003 16:26:39 +1000 If you type ?cloud, you can see that you need to provide a formula as well as a dataset. So if your variables are x,y,z in dataframe dat, then cloud(z~x*y, data=dat) should work. [...] is.matrix(sanity.MIF); is.numeric(sanity.MIF); dim(sanity.MIF); cloud(sanity.MIF) [1] TRUE [1] TRUE [1] 29703 The help(cloud) facility states: `formula' can be a matrix. As I stated, I have a 3-column numeric matrix, so colum 3 should be plotted as a point above the 1st and 2nd column co-ordinates. No plot is produced however, just a blank graphics device. Thanks. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
RE: [R] cloud function doesn't plot
On Sun, 22 Jun 2003, Tony Ross wrote: From: Simon Blomberg [EMAIL PROTECTED] Date: Mon, 23 Jun 2003 16:26:39 +1000 If you type ?cloud, you can see that you need to provide a formula as well as a dataset. So if your variables are x,y,z in dataframe dat, then cloud(z~x*y, data=dat) should work. [...] is.matrix(sanity.MIF); is.numeric(sanity.MIF); dim(sanity.MIF); cloud(sanity.MIF) [1] TRUE [1] TRUE [1] 29703 The help(cloud) facility states: `formula' can be a matrix. As I stated, I have a 3-column numeric matrix, so colum 3 should be plotted as a point above the 1st and 2nd column co-ordinates. You are misleading yourself and us by selective quoting: it says As an extension to partially support the form used in `filled.contour' and `image', `formula' can be a matrix. The form used in those quoted function is *not* a three-column matrix, and your interpretation is not in the R help file. No plot is produced however, just a blank graphics device. Not so in my experiments: a border box is drawn. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Re: [R] cloud function doesn't plot
Tony Ross wrote: From: Simon Blomberg [EMAIL PROTECTED] Date: Mon, 23 Jun 2003 16:26:39 +1000 If you type ?cloud, you can see that you need to provide a formula as well as a dataset. So if your variables are x,y,z in dataframe dat, then cloud(z~x*y, data=dat) should work. [...] is.matrix(sanity.MIF); is.numeric(sanity.MIF); dim(sanity.MIF); cloud(sanity.MIF) [1] TRUE [1] TRUE [1] 29703 The help(cloud) facility states: `formula' can be a matrix. It states completely: As an extension to partially support the form used in filled.contour and image, formula can be a matrix. Thus, see ?image that you don't need a 3 column matrix, but a matrix containing the z values. I'd suggest to convert the matrix to a data.frame and follow the suggestion from Simon Blomberg. Uwe Ligges As I stated, I have a 3-column numeric matrix, so colum 3 should be plotted as a point above the 1st and 2nd column co-ordinates. No plot is produced however, just a blank graphics device. Uwe Ligges __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help