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

ImPlot::Histogram does not work with log scale on Y axis. #244

Closed
Cazadorro opened this issue Jun 8, 2021 · 2 comments
Closed

ImPlot::Histogram does not work with log scale on Y axis. #244

Cazadorro opened this issue Jun 8, 2021 · 2 comments

Comments

@Cazadorro
Copy link

Cazadorro commented Jun 8, 2021

On demo for histogram, try right clicking and selecting y axis, then clicking log scale, the bounding "Theoretical" line remains (showing there should be something there), but the histogram itself disappears. Manually setting ImPlotAxisFlags_LogScale also does the same thing, so it isn't just some demo bug. Log scale seems to work fine for histograms on the X axis.

@epezent
Copy link
Owner

epezent commented Jun 8, 2021

Thanks. The issue is that the bottom of each bar is referenced to 0 on the y axis which can't be displayed on log scale. The result is that the entire bar is not drawn. We may need to convert 0s to a really small value to make this work. I'll have to think on it.

@epezent
Copy link
Owner

epezent commented Jun 9, 2021

Should be fixed:

image

@epezent epezent closed this as completed Jun 9, 2021
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

No branches or pull requests

2 participants