0

When running camelot-py method camelot.plot() to plot grid lines of the pdf, the output is too small to read. enter image description here

tables = camelot.read_pdf(pdf_path, pages='165', flavor='stream', 
                          flag_size=True, table_areas=['65, 760, 600, 60'], 
                          columns= ['70.1, 152.9, 236.8, 287.7, 324.9, 351.9, 387.0, 423.2, 456.8, 487.9, 514.3, 559.9'])
print(tables[0].parsing_report)
camelot.plot(tables[0], kind ='grid').show()

The resulting plot is always the same size, super small 2"x2.5" tall. Ive tried passing matplotlib commands for figsize:

fig = plt.figure(figsize=(8.5, 11))

before the camelot.plot call but then I just get this <Figure size 612x792 with 0 Axes> before the camelot plot output.

1 Answers1

0

Try set_size_inches:

fig = camelot.plot(tables[0], kind ='grid')
fig.set_size_inches(14, 30)
fig.show()

Also sometimes it is useful to change axes ticks too:

import numpy as np

xs = np.arange(0, 600, 20)
ax = fig.gca()
ax.set_xticks(xs)
# ax.set_yticks(ys)
fig.show()
arz.freezy
  • 648
  • 1
  • 6
  • 12