[R] scatterplot 3d equal axis sequence length limitation
Duncan Murdoch
murdoch.duncan at gmail.com
Thu Sep 23 21:35:13 CEST 2010
On 23/09/2010 2:10 PM, rtist wrote:
> I was wondering if anyone has a way out of the limitation that you must use
> equal length
> x,y, and z sequence lengths.
> For instance,
> x<-seq(1,100)
> y<-seq(1,100)
> z<-rnorm(100)
> scatterplot3d(z,x,y)
>
> works fine.
> However, if I get some results that has a different y subset length, such as
> x<-seq(1,100)
> y<-seq(1,300)
> z<-rnorm(100)
> scatterplot3d(z,x,y)
>
> I get the following error:
> Error in xyz.coords(x = x, y = y, z = z, xlab = xlabel, ylab = ylabel, :
> 'x', 'y' and 'z' lengths differ
>
>
> I have found one solution is to pad the values with n*0, where n is the
> number of excess variables
> of y over x and z. Unfortunately, the visual appearance is not that
> appealing. The situation is very practical as there are cases where you
> might limit the x axis variable length to some value, and have many
> more runs of y (monte carlo sweeps for instance).
I don't understand what you would want to plot: scatterplot3d is for
plotting triplets (x,y,z). If you have more y's than x's and z's, how
do you form the triplets?
Duncan Murdoch
> Ideally, rather than pad, If I cannot limit the length of one axis to the
> same length of another, I would just like the color to be transparent for
> those values (edges and vertices).
>
> thanks,
> rtist
>
More information about the R-help
mailing list