AlbertoPdRF / root-file-viewer

View ROOT files directly in VS Code!
https://marketplace.visualstudio.com/items?itemName=albertopdrf.root-file-viewer
MIT License
47 stars 5 forks source link

Issue with logarithmic view #34

Open dnwerner opened 3 months ago

dnwerner commented 3 months ago

The zoom range of logarithmic plots seems to have a bug. In my example figure (a) there are clearly bins with 1-2 entries in linear view (below 0.09), yet the logarithmic view seems to cut-off the lowest counts. The histogram is a TH1D. Then manually zooming in occasionally I can trick the viewer into zooming out (by zooming on the lower part first, and only then switching to ln-view). The issue seems to exist for all ln modes.

image Linear view (a) image Logarithmic view (b) - notice the missing 1-2 count events below 0.09. Zooming out does not reveal them.

aimeric-landou commented 1 month ago

I am also encoutering this issue. Selecting a different histogram B in the file after setting the SetLog y option for histogram A then coming back to the histogram A does fix the y-axis window issue.

dnwerner commented 2 weeks ago

Thank you, the workaround helps a lot! I hope the underlying issue gets fixed soon - It is hopefully not too difficult if a simple switch between histograms already calls the code that applies proper scaling