Giter Club home page Giter Club logo

Comments (3)

jammah avatar jammah commented on August 15, 2024

No answer to this question?

from ggvegan.

gavinsimpson avatar gavinsimpson commented on August 15, 2024

Apologies @deltoroi & @jammah for not circling back to this... too many packages, too little time.

The geom argument takes "points" or "text", but I suspect you want the points and the labels. In which case that is not offered in these autoplot methods, but it is relatively straightforward to do this yourself using geoms from the ggrepel package:

library("vegan")
library("ggvegan")
library("dplyr")
library("ggrepel")

data(varespec)

# with the development version of vegan
set.seed(23)
sol <- metaMDS(varespec, dist = "hellinger", autotransform = FALSE)
# if using the CRAN version of vegan
# set.seed(23)
# sol <- metaMDS(decostand(varespec, method = "hellinger"), dist = "euclidean")

scrs <- fortify(sol)

ggplot(data = scrs, aes(x = NMDS1, y = NMDS2)) +
  geom_point(aes(colour = Score, shape = Score)) +
  geom_text_repel(mapping = aes(label = Label), max.overlaps = 20, seed = 34) +
  coord_equal()

issue-20-answer-img

You could do this with plain old geom_label or geom_text by setting the nudge_x and nudge_y arguments but ggrepel takes care of overlapping labels which is likely to occur with these kinds of ordinations.

from ggvegan.

jammah avatar jammah commented on August 15, 2024

Many thanks @gavinsimpson

from ggvegan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.