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

possible bug in plot_fst_gwss? #721

Open
EricRLucas opened this issue Feb 3, 2025 · 3 comments
Open

possible bug in plot_fst_gwss? #721

EricRLucas opened this issue Feb 3, 2025 · 3 comments

Comments

@EricRLucas
Copy link

Apologies if I'm wrong about this.

A colleague is running plot_fst_gwss with min_clip = -1, but is finding that the y axis range of the plot is always 0 to 1.

Looking at the source code, it looks to me like this is driven by lines 238 and 255 in anoph/fst.py. This is the definition for plot_fst_gwss_track, where the value y_range is set to (0,1) and the value fig.yaxis.ticker is set to [0, 1].

I think the y_range should be set appropriately for the range of Fst that come out in the calculations. Otherwise, changing min_clip doesn't serve, because the values don't get displayed anyway.

Perhaps the minimum value of the y axis could be np.min([0, np.min(fst)]. Max value can be kept at 1 for consistency if desired.

Thanks

Eric

@github-actions github-actions bot added the triage label Feb 3, 2025
@alimanfoo
Copy link
Member

Thanks @EricRLucas, that sounds very reasonable.

@alimanfoo
Copy link
Member

Suggest to use the min_clip parameter value as the lower bound on the Y axis limits.

@EricRLucas
Copy link
Author

Thanks Alistair

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

3 participants