Hi Laurence,
Sounds like there was a plot created following the output you stated.
So can you check if there is an additional window that popped up?
Also which system you are using? As for the 3d plot to work you need quartz installed on Macs and rgl binaries installed on Linux. On Windows it should work out of the box (but an additional window will pop up).
Cheers, Bernd
==============================================================================
Dr Bernd Gruber )/_
_.--..---"-,--c_
Professor Ecological Modelling \|..' ._O__)_
Tel: (02) 6206 3804 ,=. _.+ _ \..--( /
Fax: (02) 6201 2328 \\.-''_.-' \ ( \_
Institute for Applied Ecology `''' `\__ /\
Faculty of Science and Technology ')
University of Canberra ACT 2601 AUSTRALIA
Email: bernd....@canberra.edu.au
WWW: bernd-gruber
Australian Government Higher Education Provider Number CRICOS #00212K
NOTICE & DISCLAIMER: This email and any files transmitted with it may contain
confidential or copyright material and are for the attention of the addressee
only. If you have received this email in error please notify us by email
reply and delete it from your system. The University of Canberra accepts
no liability for any damage caused by any virus transmitted by this email.
==============================================================================
--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
dartr+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dartr/a1a71482-f8c4-4e52-9b1b-382c0d3cffd8n%40googlegroups.com.
Hi Laurence,
the 3d pcoa uses the population definition to do the 3d plot.
So you would need to redefine your population definition of your genlight object (called “I” in your example)
So something like
pop(i) <- factor that codes for each individual location.
Another way is to have the factor included in your metadata when you load your data (assuming it is dart data) via
gl.read.dart(“dartfile”, “metadatafile“)
you would need to add a column maybe called “location” to your metadata file that codes for the color of the individuals.
And then you could do:
pop(i) <- i@other$ind.metrics$location
And the final more hacking version is to have a look at the gl.pcoa.plot.3d function. There you can see that the function is mostly a wrapper around functions from the pca3d package. As you can see there, the plot command is at the end here:
pca3d::pca3d(coords, shape = shape, radius = radius,
group = row.names(glPca$scores), legend = legend,
axe.titles = c(xlab, ylab, zlab))
and groupings are defined via the group argument.
Finally I just found an cool looking new github package that uses shaders to create 3d ggplot in case you want to dig down even deeper.
https://www.tylermw.com/3d-ggplots-with-rayshader/
Might be an addtion to the next version…
To view this discussion on the web visit https://groups.google.com/d/msgid/dartr/66b6bdaf-b8b4-4af9-a322-c2e08491d7f9n%40googlegroups.com.