added withfig method for use with @manipulate from Interact.jl