camelot-dev / camelot-dev/camelot
show() not showing anything
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 546
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 3
Description
Following the tutorial on visual debugging using code not command line.
show is instantly closing and not showing the figure
**Expected behavior**
Show the figure until I close it.
**Code**
import camelot
tables = camelot.read_pdf('foo.pdf')
print(tables[0].df) // this proves that Camelot works
camelot.plot(tables[0], kind='grid').show()
```
**PDF**
https://camelot-py.readthedocs.io/en/master/_static/pdf/foo.pdf
**Environment**
- OS: Mac Monterey, also tested in Windows 11
- Python version: 3.10.3
- Numpy version: Latest
- OpenCV version: Latest
- Ghostscript version: Latest
- Camelot version: Latest
**Additional context**
I'm using source code not Jupyter notebook.
I tried passing block=True to the show command as suggested in matplot lib but the camelot version of show does not accept it.
The problem is in Camelot Only. If I import MatplotLib and do plt.show() the figures stays on screen until I close it.
I read somewhere that I should init TKinter and call tkinter.mainloop() but then I get 2 Tkinter empty popup on screen.
Should I
- Init matplot lib separately and try to get the plot from Camelot ?
- Init Tkinter and try to pass The camelot Matplotlib reference to it ?
- other ?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the provided Python script with the linked foo.pdf, then inspect the implementation behind camelot.plot(...).show() and compare it with matplotlib's plt.show(). Done means the figure remains visible until the user closes it when running source code outside Jupyter, without extra empty Tkinter windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100