Search code examples
rvegan

R Is it possible to use vegan's ordisurf with a logarithmic scale


I'm using the ordisurf function to display the concentration of a certain substance within an NMDS plot. Unfortunately, the concentration ranges from 0.4 to 6 at the low end, including most of the samples. Only three samples are in the range from 500 to 1200: As you can see in the plot

NMDS ordisurf plot

the 3 samples "Mo7" are within the same ordisurf sections, whereas their Substance values are 1195.51, 615.95 and 553.27. The same goes for W22 samples, which values are close to 1.

Ordisurf here adds lines from 0 to 800, incrementing by 100. Would it be possible to use a logarithmic scale instead or somehow change the ordisurf plot parameters? This is my code

plot(nmds_cdna, type = "p", display = "sites", main ="title")
with(meta_data_cdna, ordisurf(nmds_cdna, sumSubstance, add = TRUE))

EDIT: following Jari's suggestion I added the levels argument to the Ordisurf call. This solved the issues with the unprecise increments. Still, the ordisurf lines group samples not within the correct values. This is maybe the case when it is just not possible, e.g. the positioning within the NMDS and my Substance as only explanatory variable contradict each other?

plot(nmds_cdna, type = "p", display = "sites", main ="title")
with(meta_data_cdna, ordisurf(nmds_cdna, sumSubstance, add = TRUE, levels = c(0, 1 , 10, 500, 1200))

Solution

  • Do you mean to ask whether vegan::ordisurf() has a levels argument to set the desired levels? If that was your question, the answer is positive: vegan::ordisurf() allows setting levels.