If you try to run the test.C macro in attachment, it will appear fine on screen, but once saved in graphical formats (I tried png, jpg or gif), some huge numbers appear on the bottom axis (see attachment test_534.png).
If the macro is run in ROOT 5.32, the graphical file is fine (in attachment test_532.png).
I managed to reproduce it with a musch simpler version of your macro:
{
TCanvas *c1 = new TCanvas("c1", "c1",0,0,600,600);
TPad *padhigh = new TPad("padhigh", "padhigh",0,0.28,1,1);
padhigh->Draw();
padhigh->cd();
THStack *hmcs = new THStack();
TH1F *hmcs_stack_1 = new TH1F("hmcs_stack_1","",13,-0.5,12.5);
hmcs_stack_1->GetXaxis()->SetLabelSize(1);
hmcs->SetHistogram(hmcs_stack_1);
TH1F *h4 = new TH1F("h4","",13,-0.5,12.5);
hmcs->Add(h4,"");
TH1F *hemb = new TH1F("hemb","",13,-0.5,12.5);
hmcs->Draw();
padlow = new TPad("padlow", "padlow",0,0,1,0.33);
padlow->Draw();
padlow->cd();
TH1F *hratiomc = new TH1F("hratiomc","",13,-0.5,12.5);
hratiomc->Draw();
c1->Print("c1.png");
}
it appears that this big text is here also on the screen but hidden behind a opaque pad. Anyway we should the same on bot screen and png.
Removing
hmcs_stack_1->GetXaxis()->SetLabelSize(1);
seems to help.
I continue to investigate.