complete the linking of table and plot