Skip to content

[ROOT-5125] Autozoom functionality for TH1/TH2/TH3 or TAxis classes #14538

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

Open
vepadulano opened this issue Feb 4, 2024 · 4 comments · May be fixed by #18459
Open

[ROOT-5125] Autozoom functionality for TH1/TH2/TH3 or TAxis classes #14538

vepadulano opened this issue Feb 4, 2024 · 4 comments · May be fixed by #18459
Assignees
Labels
1st Hackathon: the Fixhathon This issue can be tackled at a ROOT fixathon JIRA new feature

Comments

@vepadulano
Copy link
Member

Feature description

From https://its.cern.ch/jira/browse/ROOT-5125

I missing feature of automatic zoom in the histogram to the range where histogram is filled.
It could be very useful for 1-D histograms with single sharp peak - in this case user need many selections on axis before necessary range will be shown.
This could be menu function of TH1/TH2/TH3 class or TAxis class.
If interesting, I could provide implementation for this.

Alternatives considered

No response

Additional context

No response

@vepadulano vepadulano added new feature 1st Hackathon: the Fixhathon This issue can be tackled at a ROOT fixathon labels Feb 4, 2024
@vepadulano vepadulano changed the title Autozoom functionality for TH1/TH2/TH3 or TAxis classes [ROOT-5125] Autozoom functionality for TH1/TH2/TH3 or TAxis classes Feb 4, 2024
@martamaja10 martamaja10 moved this to Backlog in Fixathon Feb 6, 2024
@couet
Copy link
Member

couet commented Feb 14, 2024

@linev in that old Jira report you said you have some patch for this "Crop" functionality. Do you still have it ? I could not find a link to it from the report.

@couet couet moved this from Backlog to In progress in Fixathon Feb 14, 2024
@linev
Copy link
Member

linev commented Feb 14, 2024

There is no PR for it.

But I implement code in our go4 framework long time ago.

If we want to have such functionality - we can move this code into ROOT.
It can be methods for TH1/TH2 classes to automatically zoom into non-empty bins.

@dpiparo dpiparo added the JIRA label Jul 10, 2024
@dpiparo
Copy link
Member

dpiparo commented Jul 20, 2024

I was rethinking to this issue. How big is the problem? Is it worth introducing heuristics to zoom on very sharp peaks when it can be done with SetRangeUser or with 2-3 mouse movements?

@linev
Copy link
Member

linev commented Jul 29, 2024

@dpiparo

Idea to have such auto-zoom functionality in interactive canvas.

It is already implemented in JSROOT and also available in web-based canvas.
Can be see by pressing Ctrl + *. See on screenshot:
autozoom

From this point of view issue is resolved - once web-canvas will be switched as default.

@ferdymercury ferdymercury moved this from In progress to PR is open in Fixathon Apr 22, 2025
ferdymercury added a commit to ferdymercury/root that referenced this issue Apr 22, 2025
ferdymercury added a commit to ferdymercury/root that referenced this issue Apr 22, 2025
ferdymercury added a commit to ferdymercury/root that referenced this issue Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1st Hackathon: the Fixhathon This issue can be tackled at a ROOT fixathon JIRA new feature
Projects
Status: PR is open
Development

Successfully merging a pull request may close this issue.

4 participants