How to handle the scenario is which a figure updates based on a selected data set, but no data has been chosen yet?

Also, is it possible to only have one function get_plot() instead of 3 repetitions?