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

A problem with display a log funciton in a fit via extension #26

Closed skipperglume closed 1 year ago

skipperglume commented 1 year ago

When opening a histogram with a fit, which expression contains a log function, the curve is drawn incorrectly. Same histo drawn and saved in root code displays a correct fit curve. Here are two images, one made from extension and standard Draw() method.

extension_problematic_display_log_fit

using_standard_root_draw

AlbertoPdRF commented 1 year ago

Hi @skipperglume, thanks for opening the issue! Could you please provide a ROOT File so I can try to reproduce it? Thanks!

skipperglume commented 1 year ago

Hi @AlbertoPdRF ! Here are both the .root file and a code to Draw() all histo in a 'plots' folder. Run it with simple 'root test.cxx' command. https://github.com/skipperglume/Draw_Utensils/tree/main/logProblem

I use both Windows and Ubuntu, and have the problem on both setups.

AlbertoPdRF commented 1 year ago

Thanks @skipperglume! As I can also replicate the issue on https://jsroot.gsi.de/latest/api.htm#url_syntax_open_file, I'm CC'ing @linev

linev commented 1 year ago

Yes, I can confirm problem. Fixed by https://github.com/root-project/jsroot/commit/cd7f1612234688b7bbcdb2b2f72dcb7edf5a1747

Will be released later today with 7.4.2 version

AlbertoPdRF commented 1 year ago

Thanks again @linev! 🎉