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

[RDF] support bar charts in RDataFrame #17057

Open
silverweed opened this issue Nov 26, 2024 · 8 comments
Open

[RDF] support bar charts in RDataFrame #17057

silverweed opened this issue Nov 26, 2024 · 8 comments

Comments

@silverweed
Copy link
Contributor

Feature description

It would be nice if RDataFrame supported bar charts (aka TH[123] with alphanumeric bins). Currently there is a way to achieve it with a user-defined helper, but having a native API would be helpful.
Internally the helper should probably use a TH1L to store the count of occurrences for the column.

Alternatives considered

No response

Additional context

This would allow modernizing tutorials such as this and avoid the use of TTree::Draw

@dpiparo
Copy link
Member

dpiparo commented Nov 26, 2024

This is an interesting feature request: thanks. The current formulation seems to hint to the need of it to modernise a tutorial. The cost benefit ratio, as it stands, does not seem too favourable. Would the feature also address an explicit need of ROOT's users?

@silverweed
Copy link
Contributor Author

@dpiparo the only user case I'm aware of is the forum thread linked above by @will-cern

@Aditya-138-12
Copy link
Contributor

Hello @vepadulano I would love to help on this feature request...

@dpiparo
Copy link
Member

dpiparo commented Dec 19, 2024

Hi @Aditya-138-12 ! Thanks for reaching out. Would you like to try to propose a PR, test coverage and an example of this functionality?

@Aditya-138-12
Copy link
Contributor

Hi, @dpiparo ! yeah sure, working on it!!

@dpiparo
Copy link
Member

dpiparo commented Jan 11, 2025

Hi @Aditya-138-12 did you encounter difficulties?

@Aditya-138-12
Copy link
Contributor

Aditya-138-12 commented Jan 31, 2025

Hi @dpiparo, @vepadulano , @martamaja10
I’ve implemented bar chart functionality for supporting Alphanumeric bins in RDataFrame using a custom class for TH1D. After building ROOT and testing it in the CLI with .L <file_name.h>+, it works well.

Could you kindly guide me on which files to modify to integrate this into ROOT?

Thank you for your time and support!

@Aditya-138-12
Copy link
Contributor

Hi @vepadulano @dpiparo @martamaja10

I wanted to follow up on this. I’ve implemented bar chart functionality for supporting alphanumeric bins in RDataFrame using a custom class for TH1D. After testing it in the CLI with .L <file_name.h>+, it works as expected.

Could you kindly guide me on which files I should modify to integrate this into ROOT? I would really appreciate your insights.

Thank you for your time and support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants