root
root copied to clipboard
[ROOT-5125] Autozoom functionality for TH1/TH2/TH3 or TAxis classes
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
@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.
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.
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?
@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:
From this point of view issue is resolved - once web-canvas will be switched as default.