Replace PlotKit submodule with redesigned pure-Python PlotKit (#171)#278
Merged
Conversation
…PlotKit; add cmsstyle to env
…, fallback guard, type hints)
Contributor
Author
Collaborator
|
pipeline#15155590 started |
Collaborator
|
pipeline#15155590 failed |
Contributor
Author
Collaborator
|
pipeline#15161294 started |
Collaborator
|
pipeline#15161294 failed |
Contributor
Author
|
@cms-flaf-bot please test
|
Collaborator
|
pipeline#15162086 started |
Contributor
Author
|
@cms-flaf-bot please test
|
Collaborator
|
pipeline#15162161 started |
Collaborator
|
pipeline#15162086 failed |
Collaborator
|
pipeline#15162161 failed |
… in integration pipeline
Contributor
Author
|
@cms-flaf-bot please test
|
Collaborator
|
pipeline#15164400 started |
Collaborator
|
pipeline#15164400 failed |
Contributor
Author
|
@cms-flaf-bot please test
|
Collaborator
|
pipeline#15167139 started |
Collaborator
|
pipeline#15167139 passed |
Contributor
Author
|
@cms-flaf-bot please test |
Collaborator
|
pipeline#15167394 started |
Collaborator
|
pipeline#15167394 failed |
Contributor
Author
|
@cms-flaf-bot please test
|
Collaborator
|
pipeline#15167712 started |
Collaborator
|
pipeline#15167712 passed |
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.
Summary
Replaces the legacy
kandrosov/PlotKitsubmodule with the redesigned, pure-Pythoncms-flaf/PlotKit (merged in cms-flaf/PlotKit#1) — matplotlib +
mplhep by default, optional ROOT + cmsstyle. The swap is transparent:
Analysis/HistPlotter.pyisunchanged and the analysis
config/plot/*.yamlfiles keep their format, so only the submodule (URL +pointer) and the env change. Fixes #171.
Changes
.gitmodules: PlotKit URLkandrosov/PlotKit→cms-flaf/PlotKit; submodule pointer advanced tothe merged
main.run_tools/mk_flaf_env.sh:pip install cmsstyle(optional ROOT backend; lazy-imported, so nothingbreaks before the next env rebuild — mplhep already comes from LCG).
docs/: glossary, architecture and theHistPlotTaskreference updated to describe the new PlotKit(mplhep/cmsstyle, standalone
python -m PlotKit.cli, and thesignal_plot_scale: bkgoption).mkdocs build --strictpasses.Analysis/HistPlotter.py: unchanged — the preserved legacyPlotterAPI makes the swaptransparent.
Testing
all_plotshistograms (Run3_2023): the HistPlotTaskplotting path (
HistPlotter.py→ PlotKit) renders faithful stacked plots (CMS/lumi/channel/category/region labels,
divide_by_bin_width, stacked backgrounds + bkg-uncertainty band + scaledsignals + data + Obs/Bkg ratio), through both the mplhep and cmsstyle backends.
mkdocs build --strictpasses.Companion PR
config/global.yamltosignal_plot_scale: bkg(normalise each signal to thesummed background — a new PlotKit capability).