statgen / locuszoom

A Javascript/d3 embeddable plugin for interactively visualizing statistical genetic data from customizable sources.
https://statgen.github.io/locuszoom/
MIT License
154 stars 29 forks source link

Apply floor/ceiling to axis-extent before upper_/lower_buffer #90

Closed pjvandehaar closed 7 years ago

pjvandehaar commented 7 years ago

It seems like the point of the upper buffer is to be sure you always have ≥5% of the plot area open above your points, to avoid having the top points hitting the top clippath. If all your association results in the current window have p-values in [20,25], then currently the upper-buffer is based on that range of 5. ie, 55%, when I really wanted 255%. This PR fixes that. Also, it handles a bug with reversed axes when exactly one of floor/ceiling is declared and all the data is on the wrong side of it.

This will require changes to https://github.com/statgen/locuszoom/wiki/Data-Layer#axes . If you agree with the idea, I'll draft them.

I'm currently using this modified version in PheWeb.