Skip to content

Commit

Permalink
zero padding on diffderence
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Aug 20, 2024
1 parent 19ee216 commit fa46c9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions markimg/markimg.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def run(self, options):
# Print image info
for field in info.keys():
x_pos = x_pos + line_gap
display_text = field + ": " + str(info[field])
display_text = field + " : " + str(info[field])
d_info[field] = info[field]
plt.text(x_pos, y_pos, display_text, color='white', fontsize=options.textSize, rotation=90)

Expand Down Expand Up @@ -657,7 +657,7 @@ def measureLine(self, line, color, size, unit='px'):

def getDiff(self, val1, val2):
diff = round(abs(val1 - val2), 1)
return f'{diff:03}'
return f'{diff:04}'

def getSum(self, val1, val2):
sum = round((val1 + val2), 1)
Expand Down

0 comments on commit fa46c9d

Please sign in to comment.