Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single population nodes as circles, not pies #201

Closed
fdchevalier opened this issue Apr 27, 2019 · 1 comment
Closed

Single population nodes as circles, not pies #201

fdchevalier opened this issue Apr 27, 2019 · 1 comment

Comments

@fdchevalier
Copy link
Contributor

Hi Zhian,

First, thanks for developing this useful package.

When making networks, nodes representing one population (but not necessarily one sample) are displayed as pies. This is not very aesthetic and could even be misleading because the pie might suggest presence of a second population.

Here is a minimal reproducible example (tested with the master and the devel branches).

library(poppr)
data(Aeut)
adist <- diss.dist(Aeut, percent = TRUE)
amsn <- poppr.msn(Aeut, adist, showplot = FALSE)

plot_poppr_msn(Aeut, amsn, gadj = 15, inds="NA")

Another illustration of this can be found on StackOverflow.

I found a way to make single population pie as circle. This involved modification of the msn_handlers.R file on the master branch. But I noticed that this file does not exist anymore on the devel branch. In this case, modifications need to be done in the visualizations.r file.

Anyway, I made modifications on both branches. They can be reviewed here and here and tested with the minimal example above.

If you find this useful, please let me know what branch needs to be merged.

Fred

@zkamvar
Copy link
Member

zkamvar commented Apr 29, 2019

Hi @fdchevalier,

Thank you for the report and the solution! Please do make a pull request (from your changes to the master branch) and I will perform a code review. 😃

For reference, I don't use the "devel" branch anymore because it made more sense just to maintain stability on the master branch and then have experiments on separate branches with clear names. Here's the process I strive for: https://github.com/grunwaldlab/poppr/blob/master/CONTRIBUTING.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants