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

Improve TRatioPlot painting #14891

Merged
merged 10 commits into from
Mar 7, 2024
Merged

Improve TRatioPlot painting #14891

merged 10 commits into from
Mar 7, 2024

Conversation

linev
Copy link
Member

@linev linev commented Mar 6, 2024

Before several objects like TLine and TGaxis could be recreated and drawn during TRatioPlot::Paint() which was wrong approach.

Now in paint only attributes are updated - all necessary objects created when TRatioPlot::Draw() is called.

Put TRatioPlot as first primitive in the pad. By this TGaxis and TLine attributes updated before they will be actually painted.

Improve signals handling. Only one TRatioPlot::fIsUpdate is used now to prevent multiple actions at once. Make it transient.

Adjust stressGraphics refs files - PDF and PS are smaller now while less dummy primitives are created

linev added 10 commits March 6, 2024 08:59
It is not good idea to add or remove objects from
pad list of primitives when TRatioPlot::Paint is called
Therefore create TLine objects once and just update position
If lines are not visible - make them as point in the frame corner
Same as grid lines - one should not recreate TGaxis objects
but just change their attributes when painting is performed
If ratio plot load from the file, connections to the signals
are not automatically restored. Therefore check if connections are there - and re-establish them if they are missing
No need to call several update methods once
Also no need to use TClass methods via IsA().
Make ratio plot as first object in list of primitives.
When painting - one can modify axes attributes before
they really painted
No need to class change version - it was changed before

IsDrawn() method is useless - handling of signals can be
possible only when they are connected - after drawing

Format a bit header file
There are no more dummy/invisible primitives caused
by TRatioPlot painting before therefore PS/PDF are smaller
Also check allowed range in SetSplitFraction
@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds

Copy link

github-actions bot commented Mar 6, 2024

Test Results

    10 files      10 suites   2d 1h 41m 11s ⏱️
 2 582 tests  2 580 ✅   0 💤 2 ❌
24 106 runs  23 928 ✅ 176 💤 2 ❌

For more details on these failures, see this check.

Results for commit 0f08309.

@linev linev merged commit 7a0031a into root-project:master Mar 7, 2024
12 of 16 checks passed
@linev linev deleted the ratioplot_paint branch March 7, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants