At 10:15 04/05/2011, you wrote:
Content-Type: text/plain
Content-Disposition: inline
Content-length: 537

Hi everyone,

I would like to improve my plot and I was wondering if someone can help me whith it. I'm trying this plot using two groups, but I want to choice the colors (the black and white circles) but I don't know how to change it from here. These are my sentences:

myplot3d<- scatterplot3d(myfile$Temperature,
acantarcthus$Salinity,myfile$Abundance, type="h",
   color = as.integer(factor(myfile$groups)))

If someone is willing to help me with it I would be so glad.

José

        [[alternative HTML version deleted]]


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

Hi José

Have you seen the result of as.integer(factor(myfile$groups))) ? I would have given you a clue.

What you need is c("black","white") or the numerical col number equivalent by the order of the groups.

2 ways:

ifelse(myfile$groups == factor1, "black","white")

or if you had more factors

sapply(myfile$groups, pmatch, unique(myfile$groups) )

Regards

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
ARMIDALE NSW 2351
Email: home mac...@northnet.com.au

______________________________________________
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