Interactive change of mesh plot

Welcome !
You’d have more chances to get help with an MWE
(your snippet fails with “ERROR: UndefVarError: meshdata not defined”,
so it’s impossible to jump quickly to solving your actual issue).