Hi Jackson, One way to assign colors to values is: library(plotrix) ages<-seq(1, 50000, by = 100) agecol<-color.scale(ages,extremes=c("purple","red"))
Then just use "agecol" for your point colors. Jim On Tue, May 24, 2016 at 11:57 AM, Jackson Rodrigues <jacksonmrodrig...@gmail.com> wrote: > Hi everybody, > > I have a big matrix spread over a long time period. > I would like to make a ordination plot (PCA, CA, DCA etc) of this matrix > and look for patterns on time by exploring a color scheme (I have heat > color in mind). > The idea is to use a progressive color scheme ranging from red (the oldest > age) until purple (the youngest one). Then, make a ordination and see if > the similar colors are plotted together, if so , I would have a pattern on > time easily identifiable on 2 dimensions. > > Let me give an hypothetical case to you. > > mat5 <- matrix(rnorm(2000), ,4) #I have a matrix > mat5 > seq<-seq(1, 50000, by = 100) # I have a time sequence of 500 dates ranging > from 50000 to 1 > seq > > rownames(mat5) <- c(seq ) # making ages the row names of the matrix > > library("vegan") > test.pca<-rda(mat5) # Ordination (PCA) > > plot(test.pca, scaling=-3) # In this plot I would like to have the old ages > ranging from red (age 50000) to purple (age 1) > > Would that be possible?? > > Thank you all for any help > > Jackson M. Rodrigues > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.