gl.pcoa.plot.3d in presentations

95 views
Skip to first unread message

Iriel Joerin

unread,
Sep 1, 2020, 9:27:13 PM9/1/20
to dartR

Hi!
I would like to know if there is any way to export the 3d plots from gl.pcoa.plot.3d function to a presentation such as that from OpenOffice Impress or Power Point?
Thanks a lot for your answer,
Iriel

Bernd.Gruber

unread,
Sep 1, 2020, 10:34:32 PM9/1/20
to da...@googlegroups.com

Hi Iriel,

 

A simple solution is a screenshot.

 


If you want to impress your audience you might want to create a 3D animation and save it as a gif to be included in your powerpoint presentation.

 

This is code from the R-gallery so I do not take any credit for it. I just changed the rotation axis.

 

Cheers, Bernd

 

 

 

library( rgl )

library(magick)

 

 

library(dartR)

 

pc <- gl.pcoa(bandicoot.gl)

 

gl.pcoa.plot.3d(pc, bandicoot.gl)

 

 

# We can indicate the axis and the rotation velocity

play3d( spin3d( axis = c(0, 1, 0), rpm = 20), duration = 10 )

 

# Save like gif

movie3d(

  movie="3dAnimatedScatterplot",

  spin3d( axis = c(0, 1, 0), rpm = 7),

  duration = 10,

  dir = "~/Desktop",

  type = "gif",

  clean = TRUE

)

 

 

 

 

==============================================================================

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/8af6c262-fb68-472d-92dc-87b45d9bb901n%40googlegroups.com.

Iriel Joerin

unread,
Sep 2, 2020, 7:49:42 AM9/2/20
to da...@googlegroups.com
Thank you for the explanation!!
Iriel

Reply all
Reply to author
Forward
0 new messages