Replies: 1 comment 3 replies
-
Is this in a particular branch so that I can try it out? It would be nice to turn on plot(m, scaling = "symmetric", type = "n") |>
points("sites", cex = 0.7, optimize = TRUE) |>
points("species", col = 2, cex = 0.7, optimize = TRUE) where, when |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
cca
&plot.cca
were published in vegan release 1.4-0 in May, 2002. Theplot
function was intended as quick & dirty way of getting graph, but it was not really configurable: colours, shapes, character sizes, fonts were all hard-coded and could not be changed. This was not good. First relief was in 1.4-3 of April, 2003, which added freely configurablepoints
andtext
, but this was still cumbersome. In 1.4-3 we also had first version ofordiplot
which originally was intended for plotting non-vegan ordination objects (withscores
function to extract their results). Later theordiplot
improved and finally we made it work in the middle of a pipe: it takes plotting from the pipe and passes the plotting data further to the next function. Support functionstext
andpoints
were made more and more capable to reproduceplot.cca
graphics (still improved in current development version 2.6-7), and can be used instead oftext.cca
andpoints.cca
. We had to take care of using same axes, scaling etc. in allplot
commands, but this is taken automatically care of within pipe. R has now pipes (and before they were in magirttr), and people are getting used to long chains of commands, partly because that is what they need to do in ggplot graphics. With the current version, we can reproduce the defaultplot
with this pipe:It is just easy to have an arrow biplot with italic text for species names and points for sites:
This feels like good enough for flexible configuration of graphics. However, I took a step forward and re-implemented
plot.cca
withordiplot
functions. The output is very similar (almost identical) to the oldplot.cca
with its default colours, shapes and sizes, but can be freely configured. The graphical parameters can be either global dot arguments which are applied for scores, or the user can supply a list of graphical parameters that replace the defaults. This adds an argument for each score element. Looks uggly, but these can be ignored if the user is satisfied with defaults or only wants to change things globally. With newplot.cca
, the arrow biplot is easy:Here we only need arguments that change defaults.
All these functions are new and need testing. All feedback is invaluable. For instance, I'm not quite sure of the user-interface. There may also be cases where these functions fail, but that needs more extensive testing.
Beta Was this translation helpful? Give feedback.
All reactions