[R] customizing plot, Vegan CCA

Gavin Simpson gavin.simpson at ucl.ac.uk
Thu Apr 12 23:18:00 CEST 2012


On Wed, 2012-03-28 at 01:43 -0700, millerjeremya wrote:
> I’m working on a canonical correspondence analysis using Vegan. 
> I’m new to this. I would like to control the shapes and colors for each of
> my individual display points and can’t figure out the syntax. 

This comes up so often it is /the/ FAQ (well one of them anyway). So
much so I wrote a post on my blog showing how to do this. It changes the
colour of the points but you can use the same ideas to change the
plotting characters (via argument `pch`).

http://ucfagls.wordpress.com/2012/04/11/customising-vegans-ordination-plots/

See if that helps you.

G

> Here is the script I am using. It comes from Numerical Ecology in R by
> Bocard et al. 
> windows(title="CCA biplot - scaling 1", 9, 9)
> plot(spe.cca, scaling=1, display=c("lc", "cn"), main="Biplot CCA spe ~ env -
> scaling 1")
> 
> I think I should be able to add points() and text() lines to change the
> appearance of particular elements. I also will need to refer to one or more
> specific points (e.g., make rows 1-4 a red circle, 5-8 a yellow triangle,
> etc.; make V1 say “tree cover”, V2 say “altitude”, etc.; see attached file
> CCA.jpeg). 
> 
> Many thanks!
> 
> http://r.789695.n4.nabble.com/file/n4511704/CCA.jpeg 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/customizing-plot-Vegan-CCA-tp4511704p4511704.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list