drop down function with plot