ordirgl displays three-dimensional dynamic ordination
graphs which can be rotated and zoomed into using rgl
package. Function workw with all ordination
results form vegan and all ordination results known by
scores function.ordirgl(object, display = "sites", choices = 1:3, type = "p",
ax.col = "red", arr.col = "yellow", text, envfit, ...)
orglpoints(object, display = "sites", choices = 1:3, ...)
orgltext(object, text, display = "sites", choices = 1:3, justify = "center",
adj = 0.5, ...)
orglsegments(object, groups, display = "sites", choices = 1:3, ...)
orglspider(object, groups, display = "sites", w = weights(object, display),
choices = 1:3, ...)scores."sites" or "species" or other
ordination object recognized by scores."p" for points or "t" for
text labels.arrows and centroids of
environmental variables.type = "t".envfit
displayed in the graph.rgl.texts. One of these is used depending on the
version of ordirgl returns nothing.ordirgl uses OpenGL package
rgl
which may not be functional in all platforms, and can crash R in some:
use save.image before trying ordirgl.
Mac users must start X11 (and first install X11 and some other
libraries) before being able to use rgl. It seems
that rgl.texts does not always position the text
like supposed, and it may be safe to verify text location with
corresponding points.ordirgl plots dynamic graphics using OpenGL with
rgl. Function uses most default settings of
underlying graphical functions, and you must consult their help
pages to change graphics to suit your taste (rgl,
rgl.points,rgl.texts).
Functions will display only one selected set of
scores, typically either "sites" or
"species", but for instance cca also has
"lc" scores. In constrained ordination
(cca, rda,
capscale), biplot arrows and centroids are
always displayed similarly as in two-dimensional plotting function
plot.cca. Alternatively, it is possible to
display fitted environmental vectors or class centroids from
envfit in both graphs. These are displayed
similarly as the results of constrained ordination, and they can be
shown only for non-constrained ordination. The user must remember to
specify at least three axes in envfit if the
results are used with these functions. Function ordigl makes a dynamic three-dimensional graph that
can be rotated with mouse, and zoomed into with mouse buttons or
wheel (but Mac users with one-button mouse should see
rgl.viewpoint, or try ctrl-button). MacOS X users
must start X11 before calling rgl
commands. Function ordirgl uses default settings, and you
should consult the underlying functions
rgl.points, rgl.texts to see
how to control the graphics. Function ordirgl always cleans
its graphic window before drawing. Functions orglpoints adds
points and orgltext adds text to existing ordirgl
windows. In addition, function orglsegments combines points
within "groups" with line segments similarly as
ordisegments. Function orglspider works
similarly as ordispider: it connects points to
their weighted centroid within "groups", and in constrained
ordination it can connect "wa" or weighted averages scores to
corresponding "lc" or linear combination scores if
"groups" is missing. In addition, basic rgl functions
rgl.points, rgl.texts,
rgl.lines and many others can be used.
rgl, rgl.points,
rgl.texts, rgl.viewpoint,
envfit.## Examples are not run, because they need user interaction.
ordirgl(ord, size=2)
ordirgl(ord, display = "species", type = "t")
rgl.quit()Run the code above in your browser using DataLab