microeco icon indicating copy to clipboard operation
microeco copied to clipboard

NMDS aesthetics

Open jamorillo opened this issue 1 year ago • 2 comments

Hello: I have a question about the aesthetics of NMDS figures that I can't seem to resolve. How could I slightly reduce the font size of the number indicating the stress (and perhaps move it to the left), or directly remove it from the graphic? I can't find an option from Microeco, nor by modifying the graph afterwards. Thank you very much!

jamorillo avatar Dec 10 '23 21:12 jamorillo

Hi, I have introduced an additional parameter, NMDS_stress_pos, which allows for the adjustment of text positioning. When set to NULL, it means no anything to show. Please reinstall the package from github. Presented below are a few illustrative instances.

library(microeco)
library(magrittr)
data(dataset)
t1 <- trans_beta$new(dataset = dataset, group = "Group", measure = "bray")
t1$cal_ordination(ordination = "NMDS")
t1$plot_ordination(plot_color = "Group")
t1$plot_ordination(plot_color = "Group", NMDS_stress_pos = NULL)
t1$plot_ordination(plot_color = "Group", NMDS_stress_pos = c(-1, -1.5))
t1$plot_ordination(plot_color = "Group", NMDS_stress_pos = c(1, -1.6))
t1$plot_ordination(plot_color = "Group", NMDS_stress_pos = c(0.8, -1.6), NMDS_stress_text_prefix = "Stress: ")

NMDS_stress_text_prefix is another added parameter for prefix text. Thanks for your issue to make this part more convenient.

Best, Chi

ChiLiubio avatar Dec 11 '23 03:12 ChiLiubio

Hello, It worked perfectly, thanks again, Best, Jose

jamorillo avatar Dec 11 '23 09:12 jamorillo