got draw loop on off and button click dim change working on embedding canvas scatterplot