Skip to content

[hist] clip color to minimum if below with COLZ TH2 #19441

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
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ferdymercury
Copy link
Collaborator

This Pull request:

Changes or fixes:

Fixes #19438

and improve docu

fyi @azontikov

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

@ferdymercury ferdymercury marked this pull request as ready for review July 23, 2025 08:55
@ferdymercury ferdymercury requested a review from lmoneta as a code owner July 23, 2025 08:55
@ferdymercury ferdymercury requested a review from couet July 23, 2025 08:55
Copy link

github-actions bot commented Jul 23, 2025

Test Results

    21 files      21 suites   3d 13h 18m 34s ⏱️
 3 218 tests  3 214 ✅ 0 💤 4 ❌
65 859 runs  65 855 ✅ 0 💤 4 ❌

For more details on these failures, see this check.

Results for commit c460faf.

♻️ This comment has been updated with latest results.

@ferdymercury ferdymercury changed the title [hist] clip color to minimum if below [hist] clip color to minimum if below with COLZ TH2 Jul 23, 2025
Thks couet
@ferdymercury ferdymercury requested a review from couet July 25, 2025 09:37
@couet couet removed the request for review from lmoneta July 25, 2025 09:45
@couet
Copy link
Member

couet commented Jul 25, 2025

Note: I am looking at it also. There in an issue with option TEXT also.

@@ -1110,6 +1110,11 @@ painted with the color corresponding to the new maximum.
When the minimum of the histogram is set to a greater value than the real minimum,
the bins having a value between the real minimum and the new minimum are not drawn
unless the option `0` is set.
In other words, option `COLZ0` forces the painting of bins with content < set minimum with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why adding this note ? it repeats what is already said

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not specify that it depends on whether minimum is negative or positive, right?

hcol22->SetMaximum(100);
hcol22->SetMinimum(40);
}
End_Macro
Note that the behavior of `COLZ` is not symmetric: it does not draw values below the specified minimum,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment. The original doc says it already.

@couet
Copy link
Member

couet commented Jul 25, 2025

Can you add the fix to option TEXT ?
at line 10133 put:

      Double_t zmin = Hparam.zmin;
      if (Hoption.Logz) zmin = TMath::Power(10,Hparam.zmin);

and at below (near line 10154) replace:

            if (z < Hparam.zmin || (z == 0 && !Hoption.MinimumZero)) continue;

by

            if (z < zmin || (z == 0 && !Hoption.MinimumZero)) continue;

@ferdymercury
Copy link
Collaborator Author

you add the fix to option TEXT ?
at line 10133 pu

Sure, thanks, I can add that

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

Successfully merging this pull request may close these issues.

TH2D COLZ0 option color bug
2 participants