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

Clip (or otherwise hide) tree elements that are out of frame #1333

Closed
trvrb opened this issue Apr 7, 2021 · 4 comments
Closed

Clip (or otherwise hide) tree elements that are out of frame #1333

trvrb opened this issue Apr 7, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@trvrb
Copy link
Member

trvrb commented Apr 7, 2021

Context

Quite commonly there will be branches from phylotree that are just out of frame and fall alongside the x or y axis. This obscures the axis labels and generally looks messy.

This has been a minor issue since the beginning when zooming the tree with situations like:

Screen Shot 2021-04-06 at 9 54 46 PM

However, scatterplot view really exposes this issue further. See for example this view from
https://dev.nextstrain.org/staging/ncov/global-with-dfreq?f_clade_membership=20J/501Y.V3&l=scatter&label=clade:20J/501Y.V3&scatterY=logistic_growth

Screen Shot 2021-04-06 at 9 56 57 PM

All the branch lines obscure my reading of the y axis and I can't see that the lower set of red tips have a value of 0 for logistic growth rate.

Description

I'd like plotting here to work like most plotting libraries where "ink" outside of the axes frame is hidden. Ie I'd like white in the dashed boxes with axes on top:

Screen Shot 2021-04-06 at 9 56 57 PM

Possible solution
I'd assume that this could be accomplished either by:

  1. Doing something like SVG <clipPath> to clip out things out of frame
  2. Simply drawing a white background behind the axes elements

I'd assume that (2) would be the easier strategy.

@trvrb trvrb added enhancement New feature or request moderate problem labels Apr 7, 2021
@rneher
Copy link
Member

rneher commented Apr 7, 2021

This also exposes another issue: our criterion for printing strain names implicitly assumes that the visible objects are evenly spaced on the screen.

@trvrb
Copy link
Member Author

trvrb commented Apr 7, 2021

Maybe we should always hide tip labels in scatterplot and clock views? They will very often be occluding.

@jameshadfield
Copy link
Member

Will be closed by #1383

@jameshadfield
Copy link
Member

Closed by #1383 (Sep 7, 2021)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

3 participants