'How can I introduce labels that show what points represent?
Hello, in what way can I neatly show what points correspond to which sample of "soy yoghurt", "oat yoghurt" and "activia".
The code I have used to generate the plot is here
color_type = rep("white", length(sample_type))
color_type[soy_yoghurt] = "brown"
color_type[oat_yoghurt] = "blue"
color_type[activia] = "gold"
pch_type = rep(NA, length(sample_type))
pch_type[all_yoghurt] = 21 # Circle symbols
# run the mds algorithm
mds = metaMDS(bray_dist)
#plot the results
par(mar=c(5,5,2,2), xpd = TRUE)
plot(main= "Ordination of milk-products",
mds$points[,1], mds$points[,2], cex = 3, pch = pch_type,
col = "black", bg = color_type, xlab = "NMDS1", ylab = "NMDS2"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

