# NOT RUN {
data(eco3)
# The data set eco3 has 50 points in two sites,
# but points are not visible in a usual X-Y plot,
# due to the small distance among them in relation to the large
# distance between sites
var <- eco3[["P"]][,1]
plot(eco3[["XY"]], col = var)
x <- sample(1:100, 30)
y <- sample(1:100, 30)
# in a rankplot graph, the inter-individual distances are
# reduced to a single scale
rankeco3 <- eco.rankplot(var, eco3[["XY"]])
rankeco3
# the rankplot method supports the use of ggplot2 syntax with ggplot2 graphs
require(ggplot2)
rankeco3 <- eco.rankplot(var, eco3[["XY"]], interactivePlot = FALSE)
rankeco3 <- rankeco3 + theme_bw() + theme(legend.position="none")
rankeco3
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab