[R] How can I change characteristics of a cca biplot in R

Jari Oksanen jari.oksanen at oulu.fi
Tue Sep 8 13:49:27 CEST 2009


Gavin Simpson <gavin.simpson <at> ucl.ac.uk> writes:

> 
> On Mon, 2009-09-07 at 12:49 +0300, Rousi Heta wrote:
> > 
> > Hi,
> > 
> > I´m doing cca for a community data set in R and I have made a biplot
> > for my data. Otherwise everything seems to be allright but the biplot
> > is so messy I can´t read it well enough or publish it. I would like to
> > get the row numbers out of the plot: I want the species position and
> > the environmental variables in it as vectors but not the station
> > numbers. How do I get them out? 
> 
> Is this in vegan? If so, if obj contains your fitted cca model, then
> 
> plot(obj, display = c("species","bp"))
> 
> (or, if you have centroids for factor variables as well)
> 
> plot(obj, display = c("species","bp","cn"))
> 
> If you only want to plot the points rather than the labels, add argument
> 'type' to the call setting it to "p", e.g.:
> 
> plot(obj, display = c("species","bp"), type = "p")
> 
> > 
> > I have a raw species data set and a raw environmental data set and I
> > don´t have station names or numbers in the data set but R puts the row
> > names in anyway. I understand they are necessary but I just don´t want
> > to show them in the biplot.
> 
> All of this (and more) is explained in ?plot.cca (if you are talking
> about vegan::cca)
> 
> You might also like to look at ?orditkplot (which allows you to move the
> labels around yourself to get a clear plot) and ?orditorp with which you
> can set a priority for certain sites to be labelled with text whilst
> points are used for those sites that would cause text labels to overlap.
> 
Heta,

Indeed, if this cca of vegan (and not some of the other cca's) you may also
consider reading the documentation. You can use

vegandocs("intro")

which deals with cluttered plots in chapter 2.1, or

vegandocs("FAQ")

and read points 2.1.12 and 2.1.13.

In addition to those alternatives that Gav listed, these also mention functions
ordipointlabel (which can be further processed with orditkplot) and ordilabel.
You can also see plot.cca help which has some examples.

Cheers, Jari Oksanen




More information about the R-help mailing list