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

Displaying TF1 #29

Closed daimmig closed 7 months ago

daimmig commented 7 months ago

Hi @AlbertoPdRF ,

your plugin makes my life so much easier working on a server, thank you!

Perhaps I am missing something, but it seems to me that ROOT Functions (in my case a TF1, did not check others) cannot be displayed (yet?) with your plugin. I tested it by drawing it in a TCanvas together with a TGraph (using a Fit Function here) and also writing the TF1 directly to TFile. In Both cases, the function cannot be displayed. Is this a feature still coming in the future or should that be working already?

With best regards, D. Immig

AlbertoPdRF commented 7 months ago

Hi @daimmig! Thanks for the nice words 🙂

In principle there should be no problem displaying TF1s. Could you provide an example ROOT file for me to reproduce the problem you are having?

daimmig commented 7 months ago

Hi @AlbertoPdRF,

I will prepare an example file and send it to your email address with the subject "Root File Viewer: Displaying TF1" since it seems I cannot upload ROOT files here.

With best regards,

D. Immig

AlbertoPdRF commented 7 months ago

Ok, I also can't seem to be able to draw the fit function. @linev do you have any idea of what could be going on?

The sample ROOT File (with .txt extension added manually for upload): example_tgraphasym_tf1.root.txt

linev commented 7 months ago

Yes, I can reproduce the error. It is in the title of TF1, which does not contain valid expression. I provide fix in dev branch to be able use saved points in such case.

It will be merged into master and 7.5 branch once other important issue is resolved.

AlbertoPdRF commented 7 months ago

Ok, thanks! 🙂

linev commented 7 months ago

Fix now in https://github.com/root-project/jsroot/releases/tag/7.5.4 release