Fix indent

pull/2/head
Vinayak Mehta 2018-11-22 20:05:30 +05:30
parent bcde67fe17
commit 9b5782f9ba
1 changed files with 5 additions and 40 deletions

View File

@ -151,41 +151,6 @@ class TextEdges(object):
for area in table_areas:
table_areas_padded[pad(area)] = None
# debug
import matplotlib.pyplot as plt
import matplotlib.patches as patches
fig = plt.figure()
ax = fig.add_subplot(111, aspect='equal')
xs, ys = [], []
for t in textlines:
xs.extend([t.x0, t.x1])
ys.extend([t.y0, t.y1])
ax.add_patch(
patches.Rectangle(
(t.x0, t.y0),
t.x1 - t.x0,
t.y1 - t.y0,
color='blue'
)
)
for area in table_areas_padded:
xs.extend([area[0], area[2]])
ys.extend([area[1], area[3]])
ax.add_patch(
patches.Rectangle(
(area[0], area[1]),
area[2] - area[0],
area[3] - area[1],
fill=False,
color='red'
)
)
ax.set_xlim(min(xs) - 10, max(xs) + 10)
ax.set_ylim(min(ys) - 10, max(ys) + 10)
plt.show()
return table_areas_padded