bcm-uga / pcadapt

Performing highly efficient genome scans for local adaptation with R package pcadapt v4
https://bcm-uga.github.io/pcadapt
39 stars 10 forks source link

Customized ttile of figure #40

Closed zillurbmb51 closed 5 years ago

zillurbmb51 commented 5 years ago

Hello, I was trying to use pcadapt for my snp data. Is there any way to write a customized title of the pca plot.

x1321 <- read.pcadapt(bed_r1321, type = "bed")
x1321 <- pcadapt(input = x1321, K = 20)
plot(x1321, option = "scores", pop = pop_code)

This give us a figure with a title 'Projection onto PC1 and PC2'. Is it possible to write/add other text as title of the figure. I have tried 'main', 'text', 'title' arguments but nothing works. Best, Zillur

privefl commented 5 years ago

This should give you a {ggplot2} object. So, I believe you can use plot(...) + ggtitle(<your_new_title>).

zillurbmb51 commented 5 years ago

Thank you. It works!