Comments (3)
No answer to this question?
from ggvegan.
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()
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.
Many thanks @gavinsimpson
from ggvegan.
Related Issues (20)
- autoplot.prc should display species labels on the right of the plot
- List of outstanding plot methods in vegan that need adding to ggvegan
- Recreating autoplot.cca() from fortify.cca() data frame HOT 2
- Add `autolayer()` methods to facilitate customised plotting
- options to improve CCA autoplot in ggvegan HOT 1
- Lollipop chart to illustrate the species scores to an axis
- autoplot of rda showing only sites error HOT 1
- Issue downloading ggvegan in R (Version 1.1.463) HOT 11
- CCA plot issues HOT 3
- Adding biplot onto plot of fortify.rda()
- Only function avaliable is valid_layers() HOT 1
- autoplot.rda argument const is ignored HOT 4
- autoplot.rda issues HOT 1
- autoplot.rda creating an extra legend for site scores HOT 1
- Use of display= vs layers= in autoplot and scores
- no functions are exportable from package HOT 2
- Use ggrepel for the autoplot methods of ordination objects HOT 1
- `fortify()` should return a tibble
- Functions not loading HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ggvegan.