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

Center constant data when fitting. #154

Merged
merged 1 commit into from
Dec 4, 2020
Merged

Center constant data when fitting. #154

merged 1 commit into from
Dec 4, 2020

Conversation

yan-zaretskiy
Copy link

This is an extremely simple fix, I am open to changing it. The reason the current logic does not work is that if the plot.XAxis.Range.Max happens to be zero, nothing will happen. I reasoned that we don't really need to shift ranges by some percentage of the max value, we just center it.

@epezent epezent merged commit 9b5adca into epezent:master Dec 4, 2020
@epezent
Copy link
Owner

epezent commented Dec 4, 2020

I see, that makes sense. Since we have to pick an arbitrary amount to add to the min/max, I agree that +/-0.5 for a single unit span is probably the most logical choice. Merging.

phkehl pushed a commit to phkehl/implot that referenced this pull request Dec 21, 2020
Co-authored-by: Yan Zaretskiy <yzaretskiy@stoneridgetechnology.com>
Ben1138 pushed a commit to Ben1138/implot that referenced this pull request Oct 2, 2024
Co-authored-by: Yan Zaretskiy <yzaretskiy@stoneridgetechnology.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants