A table is created in a figure. Now I want to edit the table after double click at the cell, adding, deleting or revising the data in this cell. Just like the edit function
It seems that you this is not easy to achieve using pure matplotlib functional.
You should consider looking at qgrid module, which provides interactive Excel-like table editing in Jupyter Notebook.
Then, if you want to change your graph accordingly, you will need to create some interaction with the table. ipywidgets can really help you with that.