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

fix spacing #15

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified pdfs/example_2D_rectangle_pos0.pdf
Binary file not shown.
Binary file modified pdfs/example_2D_square_pos0.pdf
Binary file not shown.
Binary file modified pdfs/example_rectangle_pos0.pdf
Binary file not shown.
Binary file modified pdfs/example_rectangle_pos0_ratio.pdf
Binary file not shown.
Binary file modified pdfs/example_rectangle_pos11.pdf
Binary file not shown.
Binary file modified pdfs/example_rectangle_pos11_ratio.pdf
Binary file not shown.
Binary file modified pdfs/example_square_pos0.pdf
Binary file not shown.
Binary file modified pdfs/example_square_pos0_ratio.pdf
Binary file not shown.
Binary file modified pdfs/example_square_pos11.pdf
Binary file not shown.
Binary file modified pdfs/example_square_pos11_ratio.pdf
Binary file not shown.
11 changes: 4 additions & 7 deletions tdrstyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ def CMS_lumi(pad, iPosX=11, scaleLumi=None):
alignX_ = max(int(iPosX / 10), 1)
alignY_ = 1 if iPosX == 0 else 3
align_ = 10*alignX_ + alignY_
H = pad.GetWh()
W = pad.GetWw()
H = pad.GetWh()*pad.GetHNDC()
W = pad.GetWw()*pad.GetWNDC()
l = pad.GetLeftMargin()
t = pad.GetTopMargin()
r = pad.GetRightMargin()
Expand Down Expand Up @@ -299,11 +299,8 @@ def drawText(text, posX, posY, font, align, size):
latex.DrawLatex(posX_, posY_ - 0.004 -(relExtraDY*extraTextSize*t/2 + 0.02)*(ind+1), tt)
elif writeExtraText:
if (outOfFrame):
posX_ = l
if H == 572 and W==596: posX_ += 0.12
if H == 750 and W==696: posX_ += 0.10
if H == 572 and W==796: posX_ += 0.09
if H == 620 and W==796: posX_ += 0.07
scale = float(H)/W if W>H else 1
posX_ = l + 0.043*(extraTextFont*t*cmsTextSize)*scale
posY_ = outOfFrame_posY
drawText(text=extraText, posX=posX_, posY=posY_, font=extraTextFont, align=align_, size=extraTextSize*t)
UpdatePad(pad)
Expand Down