Cannot display line plots once table visibility set to true in dropdown menu//Python

I’d like to switch between line plots and a table using a dropdown menu.

The table does not disappear when I switch to the line plots by clicking the button in the dropdown menu. In the line plots button, “visible” for the table is set to false.

Could you please help with that?

Thank you!