download handler for saving plot without repeating code

hi @calvarez , I am glad you are making progress. Could you share a reproducible example of the app? This makes it easier for us to help you