adeverse / ade4

Analysis of Ecological Data : Exploratory and Euclidean Methods in Environmental Sciences
http://adeverse.github.io/ade4/
39 stars 10 forks source link

plot of function s.class to add x and y axis, title ... #23

Closed xndless closed 4 years ago

xndless commented 4 years ago

I didn't find a way to do it.

aursiber commented 4 years ago

Hi, The adegraphics package, a graphical package, is suitable to display ade4 outputs and customize the graphs. To add axes and title, you can see this example:

library(adegraphics)
xy <- cbind.data.frame(x = runif(200, -1, 1), y = runif(200, -1, 1))
posi <- factor(xy$x > 0) : factor(xy$y > 0)
s.class(xy, fac = posi, paxis.draw = TRUE, main = "Main title")

See the package vignette and the Chapter 4 of the ade4 book to begin with adegraphics.

sdray commented 4 years ago

A small correction: it is paxes.draw, not paxis.draw. To display labels for x and y axes use xlab and ylab arguments:

s.class(xy, fac = posi, paxes.draw = TRUE, main = "Main title", xlab = "x label", ylab = "y label")