In response to the comment above, the relevant section of makePlot[] looks like this:
result = ListLinePlot[.....]
Return[result]
and makePlot[] is called in this section of code (aciid1 and acid2 are the source data for the PopupMenus)
Style[Dynamic[$Version], DynamicUpdating -> True];
(*Dynamic[myPlot]*)
myPlot = makePlot[];
Grid[{{"First acid", PopupMenu[Dynamic[acid1], menuData],
""}, {"Second acid", PopupMenu[Dynamic[acid2], menuData],
Button["Display", myPlot = makePlot[]]}, {"", Dynamic[myPlot], ""}}]
(*Dynamic[myPlot]*)
I have used Dynamic[myPlot] in the third row of the grid, but the two commented lines show that it could also be used before or after the code which creates the PopupMenus and Button.
myPlot = makePlot[] is called for the initial display and then called each time the button is clicked
If asked, I can attach the entire notebook.