Skip to content

Commit

Permalink
Merge pull request #15 from anmalara/master
Browse files Browse the repository at this point in the history
fix spacing
  • Loading branch information
andrzejnovak authored Oct 9, 2023
2 parents cf8e34a + e60d266 commit f24ef5a
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 7 deletions.
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

0 comments on commit f24ef5a

Please sign in to comment.