Re: [R] Aid with 3-D scatterplots

From: Deepayan Sarkar <deepayan_at_stat.wisc.edu>
Date: Thu 10 Mar 2005 - 06:26:18 EST

On Wednesday 09 March 2005 13:17, Jim and Chana Milks wrote:
> I am attempting to classify pixels from a Landsat image by using their
> associated numbers in bands 2, 3, and 4 (It's from an assignment on
> classification). To aid me, I want to create a 3-D scatterplot using
> the "cloud" command. Due to my ignorance of the finer plotting
> functions, I am unable to display the scale on the three axes or to
> display the grid.
>
> My dataframe (RS) contains four columns: Class, band2, band3, band4.
> Class is the classification variable (vegetation, water, soil, etc.)
>
> The basic code I used was:
> cloud(band4~band2*band3,RS,xlab="TM Band 2",ylab="TM Band 3",zlab="TM
> Band 4",group=RS$Class).

Just 'groups = Class' should work.

>
> Unfortunately, I'm unsure which arguments to use and how to write them
> in. I've tried adding arguments using "scale", but have not been
> successful, mostly because I'm unsure which arguments apply. The scale
> I want for all three axes is 0-100.

You want

cloud(..., xlim = c(0, 100), ylim = c(0, 100), zlim = c(0, 100))

and perhaps  

cloud(..., xlim = c(0, 100), ylim = c(0, 100), zlim = c(0, 100),

      scales = list(arrows = FALSE))

-Deepayan



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Mar 10 06:29:41 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:42 EST