gl.pcoa.plot with titles

145 views
Skip to first unread message

Iriel Joerin

unread,
Aug 12, 2020, 8:04:44 AM8/12/20
to dartR
Hi!
I would like to know if there is a way to add titles for gl.PCoA plots with gl.pcoa.plot function. I couldn't find any option to do that. And maybe show the D or modify the plot in any way.
Thanks in advanced,
Iriel

Arthur Georges

unread,
Aug 12, 2020, 8:10:53 AM8/12/20
to da...@googlegroups.com
Hi Iriel,

We wrote dartR to provide some very basic analysis and to link out to other more sophisticated packages available. As such our graphics are very rudimentary.

So with gl.pcoa.plot, if you set

plot.out

If TRUE, returns a plot object compatable with ggplot, otherwise returns a dataframe [default TRUE]


the function will return a ggplot compatable object and you can play with this in ggplot2 to your heart's content. The alternative, and what I do, sadly, is export the plot as a metafile then edit and manipulate it in Adobe Illustrator. Hope this helps. A



Iriel Joerin

unread,
Aug 12, 2020, 8:14:56 AM8/12/20
to da...@googlegroups.com
It helps. Thanks for the quick answer!
Iriel

--
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/CAH6j3HXDoPnYKxk1YgAbPn2Z8-nLgH%3Dg3GGyAbiVLUQQs-_ubg%40mail.gmail.com.

Dale Maschette

unread,
Sep 27, 2020, 8:21:01 PM9/27/20
to dartR
The other option which I use is if you run  gl.pcoa.plot  without the brackets it prints all the plotting code and you can just modify/add things you need. I did this so I could add unique colors etc.  

Janice Boyd

unread,
Sep 29, 2020, 12:18:08 AM9/29/20
to da...@googlegroups.com
Dear All:
Are all these tips for someone running R ?  I am running RStudio. Executing pcoa(...) and I get  "Error in plot.new() : figure margins too large". If I first run plot.out=TRUE I don't see any plotting code.  But I can get the plot to come out if I run

> plot.out=TRUE

> pcoa <- gl.pcoa(gl.data, nfactor=5)

 

So is dartR mostly for use with R, not RStudio? 
Janice Boyd




Dale Maschette

unread,
Sep 29, 2020, 12:39:51 AM9/29/20
to dartR
This is primarily an Rstudio issue. I just put in a pull request with a fix. In the mean time you can tell R to open the plot in a new window by putting dev.new() above your plot. eg: 
gl.pcoa.plot(pcoa, gl )


Reply all
Reply to author
Forward
0 new messages