[R-sig-eco] About Vegan

Gavin Simpson gavin.simpson at ucl.ac.uk
Wed Apr 8 16:58:26 CEST 2009


[Sending this again as I appear to be having trouble sending mail to the
list from home - this one from work machine - see if it gets through]

On Wed, 2009-04-08 at 10:38 -0400, stephen sefick wrote:
> You can change the labels of the axis with breaks I believe.  The plot
> function with vegan works like the base plot.  Also, look at the
> ?ordiplot.  A reproducible example would help.
> 
> On Wed, Apr 8, 2009 at 4:50 AM, mujeeb rahman <mujeebrahmanp at gmail.com> wrote:
> > Hi All
> > I have a small doubt on biplots. How we can change the scale of biplot
> > display. In my figure, scale is 0, 200, 400, 600. But I want to adjust
> > the scale 0, 10, 20 and so on. Expecting the valuable reply

One simple solution, along the lines Stephen mentions, is to just
provide your own labels for the plot, but draw the ticks at the same
places the original plotting function would have.

So here is one way:

require(vegan)
data(dune)
mod <- cca(dune)

## plot it to see where the axes ticks are drawn
plot(mod)
## OK, so re-plot using the current ticks as 'at'
## but provide new labels
## reduce these by factor of 10
plot(mod, axes = FALSE)
at1 <- c(-2,-1,0,1,2)
at2 <- c(-2,-1,0,1,2,3)
axis(side = 1, at = at1, labels = at1 / 10)
axis(side = 2, at = at2, labels = at2 / 10)
## complete the box
box()

I'm sure there are ways to get the current tick locations, but the above
is simple to do in a non programming setting.

That addresses the presentational issue, but if you really don't want
the axis scales (they don't really mean too much) to be so big, why not
rescale your original data before analysis. It will make no difference
in CA but in PCA it will.

HTH

G


> > Mujeeb Rahman P
> > Kerala Forest Research Institute
> > Kerala, India
> >
> > _______________________________________________
> > R-sig-ecology mailing list
> > R-sig-ecology at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
> >
> 
> 
> 
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 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-sig-ecology mailing list