Skip to content

Size legend in plot_poppr_msn does not scale well with large nodes #186

Description

@Neato-Nick

Please place an "x" in all the boxes that apply

  • I have the most recent version of poppr and R
  • I have found a bug
  • I want to request a new feature

Please include a brief description of the problem with a code example:

I have an MSN with MLGs containing many individuals. I'd like to create a legend for node sizes in my MSN using the size.leg option. I've noticed that with my largest MLG, the circle is cut off by the edge of the plot space. I've toyed around with different values for parameters of the make_circle_legend internal function(xspace, x), but I can't get it quite right. I can recreate this issue by scaling up the circle size for an example dataset with fewer MLG's.

data(partial_clone)
pcmsn <- bruvo.msn(partial_clone, replen = rep(1, 10))
plot_poppr_msn(partial_clone, pcmsn, palette = spectral, inds = 9, pos = 5, nodescale = 100)

Let me know if you have any plans to fix this, or workarounds to suggest for me.

Thanks!

Update: Here's a reprex

library(poppr)
#> Loading required package: adegenet
#> Loading required package: ade4
#> 
#>    /// adegenet 2.1.1 is loaded ////////////
#> 
#>    > overview: '?adegenet'
#>    > tutorials/doc/questions: 'adegenetWeb()' 
#>    > bug reports/feature requests: adegenetIssues()
#> This is poppr version 2.7.1.99.79. To get started, type package?poppr
#> OMP parallel support: available
#> 
#> This version of poppr is under development.
#> If you find any bugs, please report them at https://github.com/grunwaldlab/poppr/issues
data(partial_clone)
pcmsn <- bruvo.msn(partial_clone, replen = rep(1, 10), showplot = FALSE)
plot_poppr_msn(partial_clone, pcmsn, nodescale = 100)


Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions