How to change the position, the size, the color and add the legend in haplotype network using R studio?

Please help me guys!
I have 20 DNA sequences from 4 sampling location, 5 individual each location. I would like to make haplotype network using R studio.
Here is my scripts


library("ape")
library("pegas")
read.dna("fiksya.fasta", format="fasta") -> Naso
Naso
NasoHaps <- haplotype(Naso)
NasoHaps

NasoNet <- haploNet(NasoHaps)
plot(NasoNet, size=attr(NasoNet,"freq")*.2, labels=F, fast=F, 
     show.mutation=T)

ind.hap<-with(
  stack(setNames(attr(NasoHaps, "index"), rownames(NasoHaps))),
  table(hap=ind, pop=rownames(Naso)[values]))
ind.hap
plot(NasoNet, size=attr(NasoNet, "freq"), pie=ind.hap) 

the output is like this

I would like to change the position of haplotype network, set the size of picture (I hope it would become bigger than now), add the legend based on the name of sampling locations, change the color based on my own preference.

Does anyone know how to do so?
Please help me.
Thank you.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.