Create Data Table Procedure

I'm trying to automate my data analysis and need to create a button on a graph that when clicked will make a "New Table..." with "waves from the Top Graph". Any suggestions?