Skip to content

Commit

Permalink
cosmetic text fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Aug 21, 2024
1 parent 10e4e21 commit 26edabb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions markimg/markimg.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,10 @@ def run(self, options):
y_pos = y_pos - line_gap

d_info = {}
# Print some blank lines
for i in range(0, 10):
x_pos = x_pos + line_gap
plt.text(x_pos, y_pos, '', color='white', fontsize=options.textSize, rotation=90)
# Print image info
for field in info.keys():
x_pos = x_pos + line_gap
Expand Down Expand Up @@ -665,15 +669,18 @@ def getSum(self, val1, val2):

def compareLength(self, left, right):
compareText = "equal"
diff_perc = ""
try:
if left > right:
compareText = f'left longer ({round(((left - right) / right) * 100, 1)}%)'
compareText = f'left longer '
diff_perc = f'({round(((left - right) / right) * 100, 1)}%)'
elif right > left:
compareText = f'right longer ({round(((right - left) / left) * 100, 1)}%)'
compareText = f'right longer '
diff_perc = f'({round(((right - left) / left) * 100, 1)}%)'
except ZeroDivisionError:
compareText = "Error: ZeroDivisionError"

return compareText + ' '
return compareText

def measureXDist(self, line, color, size, max_y, scale, unit='cm'):
P1 = line[0]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='markimg',
version='1.5.0',
version='1.5.2',
description='An app to mark landmark points and lines on an input image',
long_description=readme,
author='FNNDSC',
Expand Down

0 comments on commit 26edabb

Please sign in to comment.