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

Fixing problems with TColorDefined (in saved TCanvas as root files), other visualization problems (stats box, y-title offset) and adding a new drawing method #50

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

oglez
Copy link
Contributor

@oglez oglez commented Oct 16, 2024

The changes are inteded to fix the following issues:

+ The problem of the defined colours not saved in TCanvas saved in ROOT files, available from version 6.32 (the code incluye a control on this to prevent crashes in 6.30)

+ Fixing a problem to allow showing the stats box with cmsDraw by moving the forced "SAME" to the beginning as if set at the end, it was hiding the box as not being the first histogram to be plotted (and the use of "SAMES" was not possible).

+ Changing the default positions (very slightly, this is not fully backward compatible, but impact is minor) of the title in the Y axis, as the previous values were not completely tuned. Although no fully backward compatible, a new addition (below) allows to recover the previous behaviour (i.e. values) easily.

And to add new capabilities (fully backward compatible):

+ New method cmsObjectDraw allowing to plot *any* kind of ROOT object with an unified method and a more pythyonic way of dealing with the plotting characteristics (more flexible and scalable) of the plotting object. Totally independent of the rest of the code.

+ New argument added to cmsCanvas to set by hand the value of the offset for the Y title, as it was hard to change it automatically for all cases. The default values that were hardcoded were not fine with quantities in the axis with more that 2 digits. The default currently does not recover the previous default, but the new prectical one. Using a value of 1.2 (0.8) for square (rectangular) canvas would recover the previous values.

oglez added 2 commits October 15, 2024 16:48
…r the defined colours in canvases saved inside ROOT files
…D histograms and stats-boxes. Also adding a new drawing method in a more pythonic way
@ttedeschi ttedeschi merged commit 7915f8f into cms-cat:master Oct 22, 2024
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.

2 participants