Skip to content

Bug fixes#683

Open
cippy wants to merge 1 commit intoWMass:mainfrom
cippy:main_mergeUpstream_devel_150326
Open

Bug fixes#683
cippy wants to merge 1 commit intoWMass:mainfrom
cippy:main_mergeUpstream_devel_150326

Conversation

@cippy
Copy link
Copy Markdown
Collaborator

@cippy cippy commented Apr 10, 2026

There was a leftover bug from previous PR in setupRabbit.py, relevant only when using "--presel VAR:sum LOW HIGH", in particular with the ":sum" to integrate the selected axis before doing the fakes, since the axis name was propagated to other parts without removing the ":sum" key.
This had no effect on the standard CI workflow so it wasn't noticed.

Then, I am updating scripts/plotting/makeDataMCStackPlot.py with a new option to allow the user to set the x axis label (currently it is automatically read from the histogram axis, but sometimes that name is just a dummy and not informative).
Also, when using --customFigureWidth the plot function should set automatic_scale=False to make the option effective.

  • about this last point, it shouldn't be needed to touch automatic_scale, but there is probably a bug in wums here [0], since "width_scale" should not appear in both the width and height items for the figure when automatic_scale = True (perhaps the correct line should read figsize=(width_scale * base_size * width, base_size * width )

[0] https://github.com/WMass/wums/blob/c7e8a11a136b4b9d0df1f6fcb21d6127a4feea72/wums/plot_tools.py#L40

@cippy
Copy link
Copy Markdown
Collaborator Author

cippy commented Apr 11, 2026

I realised that "automatic_scale" is not already an existing key argument of plot_tools.makeStackPlotWithRatio, which is called by makeDataMCStackPlot.py.
Adding it requires touching wums to propagate it, so before doing that it would be actually better to clarify whether this line [0] is effectively a bug.
If it is, and I fix it, then there is no actual need to implement the automatic_scale key to make --customFigureWidth work properly(although it might still be useful to have "automatic_scale" configurable as a possibility).

Let me know what you prefer.

[0] https://github.com/WMass/wums/blob/c7e8a11a136b4b9d0df1f6fcb21d6127a4feea72/wums/plot_tools.py#L40

@cippy
Copy link
Copy Markdown
Collaborator Author

cippy commented Apr 14, 2026

This PR needs WMass/wums#26 to be merged, to implement the automatic_scale flag in plot_tools.makeStackPlotWithRatio

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.

1 participant