[hist] implement new POLF and POLN draw options#22913
Open
linev wants to merge 6 commits into
Open
Conversation
Instead direct usage of gPad->GetUxmin() for each histogram bin copy its value into variable. Do it in color painting where also polar coordinates are used.
In such case polar ranges remains fixed and when histogram zoomed, only part of histogram bins will be drawn without rescale of angle and radius ranges Also POLF draw option automatically use 0 as minimal radius when Y range of histogram is not negative - then real polar coordinates will be displayed
It is "natural" polar coordinates where X axis represents angle in radians and Y axis is radius. When zooming range remains fixed.
Instead of range [0..360) now X axis will be mapped to [-180..+180) range. This make more intuitive behaviour during histogram zooming when central X range of histogram appears around angle 0 near right side
Test Results 23 files 23 suites 3d 18h 13m 20s ⏱️ For more details on these failures, see this check. Results for commit 4b779d7. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since ROOT 6.36 implementation of "POL" draw option was changed. Angle and radius range automatically scaled to visible histogram range filling full 2*Pi angle and [0..max] radius range. This let display TH2 in polar coordinates for any provided range settings, but produced plots are not intuitive.
Therefore two new options for polar coordinates were introduced.
"POLF" - fixed polar coordinates. In such case full histogram X range mapped to -PI .. +Pi. And Y axis mapped to radius. In case of histogram zooming angle and radius of each bin remains the same (therefore name "fixed"), just number of displayed bins are reduced.
"POLN" - natural polar coordinates. In this case X axis directly represents angle value in radians (therefore name "natural") and Y axis is just radius. Such functionality was requested in https://root-forum.cern.ch/t/64949/
Also "POL" was modified. Now X range mapped to [-180 .. 180) range making more intuitive presentation when central histogram X region displayed near angle 0 on the right side of polar plot.